This is quite a large and substantial refactor of two core modules, ActiveModel::AttributeMethods and ActiveRecord::AttributeMethods. The inspiration for this PR is this blog post on the module builder pattern which I wrote a few months ago (the end of the post discusses a change to AM::AttributeMethods which is almost the same to the one here). I had intended only to change ActiveModel, but the t