Fix bug concerning different RunRailsCops in different directories.

Before this fix, the value of RunRailsCops for the first inspected file would be used for all files. The bug was found by @yujinakayama and mentioned in https://github.com/bbatsov/rubocop/commit/b587f3a840652aba0871319d5659329538858c83#commitcomment-4183846.

I measured and found that the memoization does give a small increase in performance in some cases, so I made it incorporate the given method argument rather than removing it altogether.