First, copy-pasta and add a test
DRY: Move check things to the common module level

While it makes lots of sense to bring check to all modules, of course
some modules will not be able to actually use it. Namely modules like
nop and payload modules. If you're feeling creative, you could probably
come up with semantically similar checks for those, too.
Regression test for check in exploits
Inline unit tests are so last decade

Aside from codebase-wide changes, nearly all of these tests haven't been
touched since before 2010, and there is no effort to maintain this style
of testing. We've moved on to (correctly) seperating out our tests from
our codebase.
Landing #1861 - Implement check for auxiliary modules

[FixRM:#7975]
Landing #1862 - Remove inline unit tests