Christopher Wray, who has faced repeated criticism from Donald Trump, told FBI employees that he plans to resign when President Joe Biden’s term ends.