MDL-46576 core_grade: grade/lib.php style fixes