US senators reach stopgap deal to end government shutdown, raising hopes for end to six-week-long impasse.