MDL-44070 Conditional availability enhancements (4): grade condition

Adds grade condition (back-end only). Includes new component and unit tests.

AMOS BEGIN
 MOV [requires_grade_any,core_condition],[requires_any,availability_grade]
 MOV [requires_grade_max,core_condition],[requires_max,availability_grade]
 MOV [requires_grade_min,core_condition],[requires_min,availability_grade]
 MOV [requires_grade_range,core_condition],[requires_range,availability_grade]
 MOV [cachedef_gradecondition,core_cache],[cachedef_scores,availability_grade]
AMOS END