Qunit module preparation rewrite

Needs preliminary review. Missing at least some documentation and changelog entry.
And this. Which is a different way to solve the same thing. But I've solved it more neatly.