FBI Director Christopher Wray says he intends to resign before President-elect Donald Trump's second term in the White House.