Optimal quantum tomography of states, measurements, and transformations