Qunit module preparation rewrite

Needs preliminary review. Missing at least some documentation and changelog entry.
This is an outdated diff so make sure you not miss this little conversation.