Merge tag 'v1.8.6'

1.8.6
Bump version so that we can republish
JSDoc cleanup
Merge branch 'master' of github.com:strongloop/loopback
JSDoc cleanup
Register existing model to app.models during app.model()
Merge pull request #319 from strongloop/feature/fix-app-model

Register existing model to app.models during app.model()
Tidy up app.model() to remove duplicate & recusrive call
Merge pull request #320 from strongloop/feature/tidyup-app.model

Tidy up app.model() to remove duplicate & recusrive call
Set the role id to be generated

See https://github.com/strongloop/loopback-connector-postgresql/issues/5
Add a test case
JSDoc fixes
test: fix ACL integration tests

Change the tests creating new users so that they send valid user data,
in order to prevent 422 "validation failed" responses.

Upgrade loopback-testing to 0.2.0.
package: upgrade Mocha to 1.20
Merge pull request #317 from strongloop/feature/improve-access-checks

Improve access checks tests
Make app.get/app.set available in browser

Implement settings object and methods in browser-express.
Merge pull request #322 from strongloop/feature/backport-app-settings-in-browser

Make app.get/app.set available in browser
Add createModelFromConfig and configureModel()

Add new API allowing developers to split the model definition and
configuration into two steps:

 1. Build models from JSON config, export them for re-use:

  ```js
  var Customer = loopback.createModelFromConfig({
    name: 'Customer',
    base: 'User',
    properties: {
      address: 'string'
    }
  });
  ```

 2. Attach existing models to a dataSource and a loopback app,
    modify certain model aspects like relations:

  ```js
  loopback.configureModel(Customer, {
    dataSource: db,
    relations: { /* ... */ }
  });
  ```

Rework `app.model` to use `loopback.configureModel` under the hood.
Here is the new usage:

```js
var Customer = require('./models').Customer;

app.model(Customer, {
  dataSource: 'db',
  relations: { /* ... */ }
});
```

In order to preserve backwards compatibility,
`app.model(name, config)` calls both `createModelFromConfig`
and `configureModel`.
Remove assertIsModel and isDataSource

Use `instanceof` operator instead:

  ModelCtor.prototype instanceof loopback.Model
  dataSource instanceof loopback.DataSource
refactor: extract runtime and registry

Move isBrowser and isServer from lib/loopback to a new file lib/runtime.

Move all Model and DataSource related methods like `createModel` and
`createDataSource` to lib/registry.

Remove the circular dependency between lib/application and lib/loopback,
by loading lib/registry and/or lib/runtime instead of lib/loopback
where appropriate

This commit is only moving the code around, the functionality should
not be changed at all.