Torsional oscillations of the large-scale circulation in turbulent Rayleigh–Bénard convection