Quantum non-demolition measurement of a superconducting qubit