After pushing to eliminate the agencies, US President Donald Trump reluctantly signed a spending bill that assures their survival for 2018