Convex Duality in Stochastic Optimization and Mathematical Finance