Mesoscopic shelving readout of superconducting qubits in circuit quantum electrodynamics