Adaptive Streaming: From Bitrate Maximization to Rate-Distortion Optimization