After weeks of delay, the House voted Thursday to fund much of theย Department of Homeland Security, but not its immigration enforcement operations, and sent the bipartisan package toย President Donald Trumpย to sign, ending the longest agency shutdown in history.