Extract attribute lookup cache from Model.

Extract the code of checking and caching attributes on model properties
into a separate, reusable generic AttributeLookupCache class.
Fix model commit on every change.

The model store did not check if the property that changed was actually
ignored by SQLite. Thus every time the Duration for TimeEntryModel
changed it scheduled a commit. Introduced a check to verify that the
property is indeed stored in the database before scheduling a commit of
the data.

Closes #24.