Compound models initial work

I'm creating this PR so that we have something to look at regarding compound models.  There's still work to be done on this feature, but this is a good start which brings in the majority of the new functionality.  There is still some more work needed before this can be merged, specifically:

[ ] Add documentation (working on that right now)
[ ] Maybe bug fixes

The bug fixes refer to some issues @nden brought to light.  They could be considered corner cases, but it's still important to try to fix them sooner rather than later, though they could in principle be fixed separately from this PR.

There are several other issues with this PR that are mostly issues in the code that I would like to address sooner rather than later, but they aren't issues that affect the functionality a great deal from users' perspectives (with one exception, which is incomplete handling of parameter constraints--constraints can be added to new compound model instances just fine, but I haven't worked out a system for inheriting constraints from the models that compose a compound model).  Most of these code issues can be dealt with later.