Cleanup mixin tests
Refactor modelTo logic into lookupModelTo
Merge branch 'master' into fix/refactor-modelto
Enable DL definition of embedsMany + referencesMany
Refactored embedsMany (relationName vs. propertyName)
Fix scopeMethods closure issue
add count to relations

Signed-off-by: Jaka Hudoklin <jakahudoklin@gmail.com>
Fix formatting
Implement scope.defineMethod/relation.defineMethod
Allow runtime override of scope/relation order query param
Allow partial list of ids for sortByIds
Remove redundant test
Enable DL definition of embedsMany + referencesMany
Refactored embedsMany (relationName vs. propertyName)
Fix scopeMethods closure issue
Fix formatting
Fix conflicts
Clarified tests, fixed BelongsTo.prototype.create

Added clarified test-case based on previous documentation example.

Fixed BelongsTo.prototype.create - although the foreignKey was set on
the model instance,
it was never actually persisted, unless you'd issue a separate call to
save the 'parent' model.
Refactor polymorphic relations, fix inverse #215

See #215 - when creating a related item through a the inverse of a
polymorphic HABTM relation,
the through-model was not created correctly. By refactoring the
specifics into the `polymorphic`
property of a RelationDefinition, it's now possible to handle this
correctly.
Refactor embedsMany - auto-save parent

With this change, saving an embedded model now correctly updates the
parent model.

Before, a separate `save()` call on the parent was required, contrary
to other relation types.