Expectation Consistent Free Energies for Approximate Inference