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
Landing #1861 - Implement check for auxiliary modules

[FixRM:#7975]