Oil flat as weaker dollar offsets surge in U.S. gasoline stocks