FBI head nominee Wray pledges he would resign before improperly dropping an investigation