Refactored submodel system so that Model classes generate 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.