Energy-optimal Planning and Control of Autonomous Underwater Vehicles Under Ocean Currents