lib/loopback: fix jsdoc comments

Use
     @property {Object} [properties]
instead of
     @property {Object=} properties
for optional properties.

Use `**example**` instead of `@example`, since strong-docs don't support
the latter.
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.
test: add debug logs

Add debug logs to troubleshoot two unit tests failing
on the CI server only.
lib/registry fix jsdoc comments

Add missing names.
Merge createModelFromConfig with createModel

Merge the two methods `loopback.createModel` and
`loopback.createModelFromConfig` into a single method `createModel`.
registry: fix non-unique default dataSources

Fix the problem where `registry.defaultDataSources` has two instances:

 - `require('loopback').defaultDataSources` used by
   `loopback.autoAttach()`

 - `require('./registry').defaultDataSources` used by
   `app.dataSource`.

I am intentionally leaving out unit-tests as the whole `autoAttach`
feature is going to be deleted before 2.0 is released.
registry: export DataSource class

Expose the juggler's DataSource constructor as `loopback.DataSource`.

The DataSource constructor is most useful to check
for `instanceof DataSource`, but it also makes the loopback API more
consistent, since the API is already exposing all pre-built Models.
Merge pull request #308 from strongloop/feature/cleanup-after-pr-304

[2.0] cleanup after pr 304