The president of the University of Virginia is resigning following pressure from the Trump administration to step aside amid a Justice Department investigation into the school’s diversity practices.