Implementation of self-consistent MGGA functionals in augmented plane wave based methods