Oil gains after US leaders strike debt deal