Refactored submodel system to use ModelSpecs

Introduced specifications.py for defining declarative Specification
objects, including a new addition called ModelSpec. A Model is now a
class that generates a separate, declarative ModelSpec object. These
changes are discussed in PR #580.