Detect in-place changes on mutable attributes on Active Model

We have several mutable types on Active Record now. (Serialized, JSON,
HStore). We need to be able to detect if these have been modified in
place. By storing the hashed value of the original attribute, we can
achieve this without significantly increasing memory usage or time for
dirty checking per-record.

fixes #8328