Salesforce Contracting Under Uncertain Demand and Supply: Double Moral Hazard and Optimality of Smooth Contracts