MDL-47255 core_grades: Save aggregationcoef2 and weightoverride in history

Part of: MDL-46576
MDL-47254 core_grades: Backup aggregationcoef2 and weightoverride

Part of: MDL-46576