Distinguishing coherent and thermal photon noise in a circuit QED system