Detection of a persistent-current qubit by resonant activation