President Trump’s embattled labor secretary, R. Alexander Acosta, on Friday announced his plans to resign as controversy lingered over his handling of a sex crimes case involving a financier, Jeffrey E. Epstein, when Mr. Acosta was a federal prosecutor in Florida.