Quadratic Hedging of Commodity and Energy Cash Flows