Democrats struck a rare deal with President Donald Trump Thursday to separate funding for the Homeland Security Department from a broad government spending bill.