The president’s son agreed to plead guilty to two tax-related misdemeanors and struck a tentative deal on a gun possession charge.