Make `ActiveSupport::Configurable` enabled classes serializable

Alternative implementation of fix to serialization of
`ActiveSupport::Configurable` enable objects.

This is a better implementation compared to the one presented in
rails/rails#15055, in the sense that it doesn't overwrite
`#marshal_dump` and `#mashal_load` in the objects that include
`ActiveSupport::Configurable`.

In the other hand, breaks `#compile_methods!` because methods compiled
to one object that uses `ActiveSupport::Configurable` pollutes all
classes that include it.

rails/rails#15055
rails/rails#9299