Purcell effect in a circuit-QED implementation of a universal two-qubit gate