The moist available energy of a conditionally unstable atmosphere