Add `set_delivery_method` and `restore_delivery_method` to `ActionMailer::TestCase`.

This way these methods are available outside the ActionMailer test suite, but
they are still duplicated inside `test/abstract_unit` for test cases that don't
inherit from the `ActionMailer::TestCase` class.
Merge pull request #16571 from lucasmazza/lm-fix-actionmailer-test-case

Add `set_delivery_method` and `restore_delivery_method` to `ActionMailer::TestCase.