Hard paywall takes The Times from loss to profit