Dependency on `detect-tests` should be optional as it's not required outside of MRs

Summary

Given than detect-tests only provides meaningful artifacts in MR pipelines, we should make the dependency on it optional for .rspec-base and change .rails:rules:detect-tests to only run for MRs.

This is a small optimization.