Add counter cache test for class_name

Backport test from #14410
Merge pull request #14413 from arthurnn/port_test_cc

Add counter cache test for class_name
Reorder conditional logic

According to the best practice that "unless not" and "unless else"
is hard to follow logically the link_to_unless and link_to_if
were reversed.
Merge pull request #14421 from davidpdrsn/reorder-conditionals

Reorder conditional logic in link_to_if and link_to_unless
Fix a typo to make clause plural [ci skip]
Merge pull request #14429 from chriskohlbrenner/fix_typo_ar_querying_guide

Fix a typo to make clause plural [ci skip]
Added a warning about serializing data with JSON cookie jars [skip ci]

Closes #14409
Merge pull request #14431 from chancancode/warn_about_json_cookie_jars

Added a warning about serializing data with JSON cookie jars [skip ci]
Extract common setup for loading tasks in rake notes tests
Remove extra space assertion

No need to check that each line contains an extra space, just matching
the space in the regexp is enough to ensure that.
Extract rake notes command and lines scan boilerplate

Refactor to a reusable method.
Move booting/loading tasks setup to the rake notes helper method
Refactor assertion of line numbers matching 4 spaces