Energy-Efficient UAV Communication with 3D Trajectory Optimization