Senate leadership agrees to deal to end shutdown, raise borrowing cap