Quantum measurements in gravitational-wave detectors