The House voted to impose a tentative agreement to avert a rail strike, then voted to give workers seven days paid sick leave.