Lawmakers threatened United Airlines and other carriers with legislation to force improvements as they expressed disgust after a passenger was dragged off an overbooked flight last month.