GRAILS-11003: Add ClassRuleFactory and RuleFactory interfaces