Quantum non-demolition detection of single microwave photons in a circuit