MDL-47274 core_grades: Correct totals when excluding hidden items

Part of: MDL-46576
MDL-47009 Grades: Improve natural weighting algorithm

It's still not perfect, but this is getting closer.

This is based on Johns work on MDL-47009 (just the algorithm). There are some additional
changes to scale the weights if they do not add up to 1.

Part of: MDL-46576
MDL-47078 Grades: Allow users to have different max grades due to exclusions etc.

This is about making this work with natural weightings.

Part of: MDL-46576
MDL-47059 Grades: Make natural weights work with exclude empty grades

Part of: MDL-46576
MDL-47059 Grades: Make natural weights work with extra credit

Part of: MDL-46576
MDL-47059 Grades: Update the grade_grade if the finalgrade/or the grademax has changed.

Part of: MDL-46576
ADDING core_grades TAG TO BEHAT FEATURES
MDL-47146 grades: merge simple and full view in setup

AMOS BEGIN
 CPY [categoriesanditems,core_grades],[setup,core_grades]
AMOS END
MDL-47146 grades: remove advanced mode in setup
MDL-47146 grades: fix navigation bar in grades setup pages

Part of: MDL-46576
MDL-47146 grades: change action buttons on setup screen

Part of: MDL-46576
MDL-47146 grades: change columns on setup page

Part of: MDL-46576
behat fixes