What began as a budget impasse has turned into an unprecedented effort to fire federal employees and weaken agencies whose work runs counter to Trump’s agenda.