Update `OnBeanCondition` to be an `AutoConfigurationImportFilter` and filter out classes early. See gh-13328