Senate passes bill to reopen the government as 8 Democrats join with Republicans to send it to the House