Add backwards-compatible support for rails 4
Extract HasManyAsPolymorph modules for Rails 3 + 4
Extract belongs_to_polymorphic into module
Extract validates_polymorph into module