Optimal Measure Transformations and Optimal Trading