Active near-unity absorption resonances in phase-transition material based all-dielectric nanogratings