The president is directing agencies to work with Elon Musk’s team to dramatically reduce staffing and to limit hiring.