MOTECH-978 Migrate mTraining to MDS

This refactors mtraining and migrates it to MDS. Cherry-pick from 0.24.X to Master.

Change-Id: I10360f6dee817f038b173eabb32891d24779c328
Merge "MOTECH-978 Migrate mTraining to MDS"