(PUP-2901/PE-4524) Add module dependency validation

Prior to this commit there wasn't much verification for module dependencies.
This commit adds verification the module dependencies have sane names and version
ranges. If verification fails, it will raise an argument exception.
Weren't they added for this pull request? Or am I missing something?