Response of finite-time particle detectors in non-inertial frames and curved spacetime