Quantum critical detector: amplifying weak signals using discontinuous quantum phase transitions.