Gaetz’s resignation effectively means he will escape a House Ethics Committee investigation into alleged sexual misconduct.