Add *_previously_was attribute methods when dirty tracking
#36836

dhh wants to merge attribute_previously_was into master

We do not currently have an analysis of these two commits