The dismissals appeared to violate federal law, which requires Congress to receive 30 days’ notice of any intent to fire a Senate-confirmed inspector general.