Internal refactoring to enable opt-out of infer filetype behaviour

Re-issue of https://github.com/rspec/rspec-rails/pull/968 against master.

This does not change the public API, but gives me a less hacky backdoor to opt-out of infer filetype behaviour than I'm currently using.

@alindeman @myronmarston