The control of tonic pain by active relief learning