Homodyne detection of coherence and phase shift of a quantum dot in a cavity