Add support for polymorphic links

Uses JSON API's linked resource object format to represent polymorphic
belongs_to relations.
Merge branch 'add-polymorphic-links' into dev