Rails-style polymorphic relations

All relations are supported: hasOne, belongsTo, hasMany + through, hasAndBelongsToMany + through. 

Note that explicit through-models are needed, since the intermediate model cannot be created automatically - it's being shared with different models.

Inverse relations are supported as well, and the right model type will be returned.

See also: http://guides.rubyonrails.org/association_basics.html#polymorphic-associations

Examples:

``` javascript
// belongsTo (main polymorphic model)
Picture.belongsTo('imageable', { polymorphic: true });

// hasOne
Author.hasOne(Picture, { as: 'avatar', polymorphic: 'imageable' });
Reader.hasOne(Picture, { as: 'mugshot', polymorphic: 'imageable' });

// hasMany
Author.hasMany(Picture, { polymorphic: 'imageable' });
Reader.hasMany(Picture, { polymorphic: 'imageable' });
      
// hasAndBelongsToMany + through (will setup Picture.belongsTo)
Author.hasAndBelongsToMany(Picture, { through: PictureLink, polymorphic: 'imageable' });
Reader.hasAndBelongsToMany(Picture, { through: PictureLink, polymorphic: 'imageable' });
```





@raymondfeng in that case, I'll see what I can do - I'd really like to see this merged in soon. Is it OK if I presume that it will be merged? Then I can go ahead and implement my app-specific bits based on this right away.

What about my other PR?