MDL-47377 core_grades: Handle items with a weight of 0

They do not contribute to the category/course total any more.

Part of: MDL-46576
MDL-47377 core_grades: Behat test to cover 0 weights
MDL-47430 core_grades: Handle negative grademin with natural weighting

Part of: MDL-46576
MDL-47430 core_grades: Adding behat test for alternative mingrade

Part of: MDL-46576