Use teardown helper method.

Follow-Up to https://github.com/rails/rails/pull/14348

Ensure that SQLCounter.clear_log is called after each test.

This is a step to prevent side effects when running tests. This will allow us to run them in random order.
Merge pull request #14380 from tgxworld/use_teardown_helper_method_in_activerecord

Use teardown helper method.