Start work on Model base class.

This patch wraps a bunch of the initialization goop that was previously
occurring in `_test.py` in a `Model` superclass. You can now just
subclass and then invoke the run method.

In addition, there's the beginnings of some logic to track updates to
attributes.
Merge branch 'model'