Qunit module preparation rewrite

Needs preliminary review. Missing at least some documentation and changelog entry.
Since this occurs only rarely, it over-complicated the module preparation code to support an argument for a modification call. Instead, the approach is to tear down the existing editor and initialize a new one, doing this modification in its `postInit`.