Replace hardcoded reference for the Rails module with a configuration injected through a Railtie.

Requiring `action_controller/test_case` now defines a shallow `Rails` module that
breaks our 'feature detection' when running our tests. To ensure a more pluggable
setup, we should inject this boolean check as a global configuration filled by
a railtie class.