Merge upstream master for ActiveModel 4.1 support

Merges in master from upstream so that we gain ActiveModel 4.1 support.