ModelRelation: fix relations and serialization

Fix the definitions in `models.json` to get

 - the following code working:

         modelDefinition.relations.create({type,model,foreignKey}, cb);

 - correct data in `models/{name}.json`
ModelDefinition: include custom options

Add a new `ModelDefinition` property `options` to hold custom model
options like mapping to Oracle tables.

Fix `ModelDefinition.getConfigData` to preserve custom properties in
the JSON output.
ModelDefinition: drop `dataSource`, add `base`

Remove the `dataSource` property from the `ModelDefinition` entity.
Model data-source is configured via `ComponentModel.dataSource`.

Add the `base` property to `ModelDefinition` allowing users to configure
the base class of the model.
Support `_meta.sources` in `models.json`

Enhance the end-to-end to create a custom model in the root component
and use it in the `rest` component.

Add `modelsMetadata` property to ComponentDefinition and implement
loading/saving of this property as `_meta` in `models.json`.

Fix `rest` component template to include model source pointing to
shared models.
connector: synchronize reads and writes

Ensure:
 - there is only one write being executed at any given time
 - there is only one read being executed at any given time
 - there is never both read and write being executed at the same time

This commit adds a clever mutex/queue mechanism that collects all
pending requests to save the data and executes only one write instead.

`connector.loadFromFile` bails out immediately when there is a pending
write.

The change in test/workspace fixes a unit-test that depended on the race
condition in the older version of the connector.
Merge pull request #73 from strongloop/improvements-and-fixes

Improvements and fixes