Added support for polymorphic many-to-many relationships

See http://laravel.com/docs/eloquent#many-to-many-polymorphic-relations