Restore the ERR_remove_thread_state() API and make it a no-op