Biden signs bill that averts government shutdown and brings a close to days of Washington upheaval