MDL-18770 gradebook: setting grade values properly for assignment and quiz

Assignment was setting gradetype to GRADE_TYPE_TEXT for grade = 0
and quiz was not setting max and min for GRADE_TYPE_NONE.
Values should be set appropriately to get desired result for view/aggregate etc.