Days before a spending deadline, Republicans rejected a demand by Democrats to drop money for the Department of Homeland Security from a government funding package.