Duality Theory For Optimal Mechanism Design