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.
Treat invalid uuid as nil
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"`
Move #encode_with to Relation
nodoc enum hooks [ci skip]
Revert "Rename to test_mysql_strict_mode_disabled_dont_override_global_sql_mode"

This reverts commit babc24c1b07c1fd58b9b3249b0256f9b0d45c0f0.

Conflicts:

	activerecord/test/cases/adapters/mysql/connection_test.rb
	activerecord/test/cases/adapters/mysql2/connection_test.rb
Added truncate_words method to activesupport strings
Remove unused fixtures

These fixtures are not used in actionpack tests.
Added PartialIteration class used when rendering collections

The iteration object is available as the local variable
"template_name_iteration" when rendering partials with collections.

It gives access to the +size+ of the collection beeing iterated over,
the current +index+ and two convinicence methods +first?+ and +last?+

"template_name_counter" variable is kept but is deprecated.

[Joel Junström + Lucas Uyezu]
No need to have a file to PartialIteration class

This class is only used on the PartialRenderer.
Build only one PartialIteration object for loop
Document the PartialIteration object
Add CHANGELOG entry for PartialIteration.

Closes #7698.
Merge branch 'joeljunstrom-local-iterator-for-partial-collections'

Squash and merge #7698 doing some improvements to the original
implementation.
Fix typo on the variable name
Merge pull request #15718 from chancancode/regression_from_15694

Fixed a regression introduced in 84cf156
always transcode the file to utf-8

people may be passing filenames to the constructor that are not utf-8,
but they will assome that calling `original_filename` returns utf-8
(because that's what it used to do).
Merge pull request #16183 from goddamnhippie/fix-psych-warning

Implement required #encode_with
Merge pull request #15944 from seuros/uuid

Treat invalid uuid as nil

Conflicts:
	activerecord/CHANGELOG.md