Create an ActiveModel::Identity mixin

This commit moves ActiveRecord::Core#== and #hash into a module in ActiveModel.  Any class can now include this mixin to have two instances be considered equal based on their `id`.

I considered making the attribute used for comparison configurable, but it seemed like a lot of complication for little gain.  Sound reasonable?
Not in scope for PR, but on the topic of what's in ActiveModel, perhaps should be same approach as for AR - have an `ActiveModel::Base` which extends `ActiveModel::Model`. AM:M would be the bare minimum for model to work for form purposes, while AM:B would have closer behavior to AR:B (such as comparables, equality, and all the other mixins available in ActiveModel.