Fixed a regression introduced in 84cf156

84cf156 (PR #15694) introduced a subtle regression. There are actually three
distinct entry points to creating an AR object – via .new (i.e. #initialize),
via #init_with (e.g. from YAML or database queries) and via .allocate.

With the patch in 84cf156, attribute methods and respond_to? will not work
correctly when objects are allocated directly, without going through either

The reason this test case didn't catch the regression was that the `Topic`
class is shared between test cases, so by the time this test case is ran the
attribute methods are very likely to be defined.

Switching to use a fresh anonymous class in the test to ensure we surface this
problem in the future.
remove Set.new from DetailsKey::get, impacts rendering overhead performance

Using ruby-prof, I noticed that Set#add had the largest 'self time'
percentage (5% of the overall time spent rendering) when
benchmarking the rendering of a small cached ERB template that was 3
lines long. It turns out it was from this line. I don't believe the
Set is necessary, either. Removing this line increases the rendering
ips using Benchmark::ips accordingly.
AttributeSet#include? -> AttributeSet#key?

https://github.com/rails/rails/pull/15868/files#r14135210
Treat invalid uuid as nil
Deprecate ActiveModel::Dirty#reset_changes in favor of #clear_changes_information

This method name is causing confusion with the `reset_#{attribute}`
methods. While `reset_name` set the value of the name attribute for the
previous value the `reset_changes` only discard the changes and previous
changes.
Deprecate reporting methods for silencing output as they aren't thread safe
Implement required #encode_with

While running the spec `ARCONN=mysql2 ruby -v -Itest
test/cases/yaml_serialization_test.rb`
the following warning shows up:
`implementing to_yaml is deprecated, please implement "encode_with"`
Keep quietly and capture undeprecated on your suite
Add CHANGELOG entry for #13392 [ci skip]
Deprecate `reset_#{attribute}` in favor of `restore_#{attribute}`.

These methods may cause confusion with the `reset_changes` that
behaves differently
of them.

Also rename undo_changes to restore_changes to match this new set of
methods.
Merge pull request #16180 from rafaelfranca/rm-dirty

Improve Active Model Dirty API.
RouteSet should be in charge of constructing the dispather

Now we can override how requests are dispatched in the routeset object
remove useless ivar set
set `set` in the setup method
execute a request and check the path_parameters

This actually runs a request through the system, using the actual
routing methods as we would use in production, then tests the
path_parameters set on the request object.  The `recognize_path` method
isn't actually used in production, so testing what it returns isn't
useful.
stop calling url_for with recall parameters and actually use a request
fix warnings
rack 1.6 encodes the filenames in posts correctly now
Move uuid_v5 and uuid_v3 to Digest::UUID

These methods are not random so they should not belings to SecureRandom
module.
stop passing recall to url_for