Improvements and fixes

Another round of changes for the yeoman generator.

 - relations and serialization
 - ModelDefinition: include custom options
 - ModelDefinition: drop `dataSource`, add `base`
 - Support `_meta.sources` in `models.json`
 - connector: synchronize reads and writes (fix a race condition)

/to @ritch please review