Split plugin application handling from plugin querying

+review REVIEW-5214
Add ability to query for plugins and rule sources by id

+review REVIEW-5214
Add caching to ModelRuleSourceDetector

+review REVIEW-5214