Update MetricFilterAutoConfiguration to ensure that it is only applied if Spring MVC is on the classpath. Fixes gh-2542