Dirty field checking.

Document now has a changed_fields property that contains the set of field names
that have been changed since the Document has been initialized. This set is
cleared whenever the Document is saved.