Define two new types: ModelSettings and ModelProperties to describe the
objects describing model properties and settings.
Add static property `base` and static method `extend` to the definition
of `ModelBase` class.
Add property `defaultModelBaseClass` to `ModelBuilder` class definition.
Fix `PropertyDefinition` interface: remove `name`, add optional `id`.
Callback's first argument is an optional Error now. Was: required `any`.
PersistedModel methods return `PersistedModel` now. Before this change,
methods were returning `PersistedData` (`PersistedModel | AnyObject`).
The problem with `AnyObject` is that it does not contain any
`PersistedModel` instance data and cannot be assigned to functions
expecting `Partial<PersistedModel>`. As a result, consumers of this API
were forced to either cast the result to `PersistedModel` (which feels
wrong) or deal with the `AnyObject` case (which never happen at
runtime).
Fix definition of `ModelData<T>` to `T | Partial<T>`. Before this
change, `ModelData` allowed any values not related to the actual
model at all, for example arrays.