Move I18n.locale setting into setup and teardown.
Merge pull request #15383 from zuhao/refactor_actionpack_localized_templates_test

Move I18n.locale setting into setup and teardown.