This is required for moving theming plugin to js.
Also refactor the GrPluginEndpoints to unify the logic of
importing html into one place. Once `html` plugin are no
longer supported, we can remove that.
Moved all the tests touched to karma as well.
Change-Id: I3ca4ffa4448e1685e70c54c31c0a62c62d493aa6