Contract Design for Energy Demand Response