A general dead-time correction method based on live-time stamping. Application to the measurement of short-lived radionuclides. (December 2017)