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
quick commit message
MDL-47110 grades: more behat tests
current incarnation including Marina behat tests