refactor(module): changes the model function so its first parameter is a definition.

BREAKING CHANGE: restmod.model no longer accepts the resource url as it first parameter, use the PATH variable instead.

To migrate change call to `restmod.model('url', { /* ... */ })` to `restmod.model({ PATH: 'url', /* ... */ })`, and calls to `restmod.model(null, { /* ... */ })` to `restmod.model({ /* ... */ })`.

Closes #116
feat(model): makes $inferKey public so it can be overriden.

Closes #113
feat(common): adds the $asPromise method
feat(builder): define accepts individual implementations for record/collection/type.

BREAKING CHANGE: define and classDefine no longer accept types other than functions.

Replace calls to `define({ /* various methods */ })` by various calls to `define`, same for classDefine.

Replace usage of `classDefine` for type level config variables by proper configuration variables set
using `setProperty`.
feat(plugins.paged): changes use of classDefine variables by configuration variables
feat(plugins.debounced): changes use of classDefine variables by configuration variables
Revert "refactor(module): changes the model function so its first parameter is a definition."

This reverts commit 4db475ce4f3cf1c5d9dbb6b30b822e388013165a.

Conflicts:
	test/builder-spec.js
	test/common-api-spec.js
feat(model): adds $mix method to extend a model after being created

Refactors the way the builder dsl is generated.
refactor(model): StaticApi no longer includes CommonApi

BREAKING CHANGE: CommonApi methods are no longer available at static (class) level
feat(utils): overhaul extendOverriden to be used in factory
refactor(): switches to Utils.extendOverriden and moves common $wrap/$unwrap methods to common api