A record number of people move out of being economically inactive, driven by younger and older workers.