added initial support for BaseRef
added support for arrays of BaseRef; added support for nested references; added BaseRef::model() and BaseModel::reference()
added support for model resolution
Merge branch 'base-ref'