(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.
I believe it was initially present for serialization, and later for providing external accessibility to the data structure, I think it's presently just an artifact of another time.