Change models.json to configure existing models

Breaking change.

In the new 2.x project layout, definition of loopback Models is out of
scope of the boot process. The bootstrapper only configures existing
models - attaches them to a dataSource and the app object.
Remove auto-attach.

Breaking change.

The bootstrapper no longer calls `loopback.autoAttach`. Applications
have to explicitly configure datasources for their models
via `models.json`.
Merge pull request #9 from strongloop/configure-models

Configure models
Rework model configuration

Rework the way how models are configured, the goal is to allow
loopback-boot to automatically determine the correct order
of the model definitions to ensure base models are defined
before they are extended.

 1. The model .js file no longer creates the model, it exports
 a config function instead:

  ```js
  module.exports = function(Car, Base) {
    // Car is the model constructor
    // Base is the parent model (e.g. loopback.PersistedModel)

    Car.prototype.honk = function(duration, cb) {
      // make some noise for `duration` seconds
      cb();
    };
  };
  ```

 2. The model is created by loopback-boot from model .json file.
  The .js file must have the same base file name.

 3. The `boot()` function has a new parameter `modelSources` to
  specify the list of directories where to look for model definitions.
  The parameter defaults to `['./models']`.

As a side effect, only models configured in `models.json` and their
base clases are defined. This should keep the size of the browserified
bundle small, because unused models are not included.
Merge pull request #10 from strongloop/auto-require-model-definitions

[2.0] Rework model configuration
package: Bump up the version to 2.0.0-dev
compiler: Move model-sources cfg to models.json

Remove `modelSources` option from `boot()` options, add `_meta.sources`
to `models.json`.

```json
{
  "_meta": {
    "sources": ["./custom/path/to/models"]
  },
  "Car": {
    "dataSource": "db"
  }
}
```
executor: Split model boot into two phases

In the first phase, all models are defined.

In the second phase, models are configured, attached to data-sources
and exposed on the app object.

This way when the `attached` Model event is emitted, all models are
already defined and thus a listener can get reference of any other
model used in the app.
compiler: Sort models topologically

Sort models topologically using Base->Model as edges. This way
the base models are defined before the models extending them.
Merge pull request #11 from strongloop/model-boot-improvements

[2.0] Model boot improvements
Merge branch 'master' into 2.0

Conflicts:
	index.js
	package.json
Rename `app.json` to `config.json`

The new loopback project layout adds a concept of components like
'rest server' and 'isomorphic client', each component having its own set
of boot files. The name `app.json` is confusing, since it is configuring
a component, not the app (which is the whole project).
Merge pull request #13 from strongloop/rename-app-json-to-config-json

Rename `app.json` to `config.json`
Merge branch 'master' into 2.0

Conflicts:
	README.md
	docs/configuration.md
	lib/executor.js
	package.json

Changes in the docs were merged manually and updated to correctly
describe the 2.x layout.