Support for Rails 4.

This adds support for Rails 4.
Query aliases have been fixed on enum models.
EnumerationReflection fixed to properly support joins.
Merge remote-tracking branch 'origin/rails_4'