Oil gains as hurricane shuts U.S. output, stockpiles fall