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. I'd like to move this to its own function / class and add tests. But I think its ok to merge for now.

We might even be able to move some of this to the memory connector itself.