MDL-37635 Assign: Prevent errors when viewing a feedback for an assignment with no gradeitem in gradebook

Also adds unit tests to verify that:
Feedback is visible even if there is no grade
The grade is not shown if the gradeitem is hidden unless you have mod/assign:grade capability