MDL-40697 core_grades: added grade_created event
MDL-40697 core_grades: added grade_updated event
MDL-40697 core: added 'triggerevent' DB column
MDL-40697 core_grades: flag grades that require an event to be triggered
MDL-40697 core_grades: trigger the grade_created/updated events