ONS data reflect effect of sharp rises in minimum wage since 2016 but confirm stagnation in average earnings