The effect of gravity on quantum phase measurement, with special consideration of the equivalence principle