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
> Not a fan of implementing this inline. Instead I'd like to move this to its own function / class and add tests.

:+1: I feel the same.