Congressional leaders reach $1.66tn deal on US spending ahead of feared shutdown