Mattdrayer/api course avg total enrolled

Updated the course average calculation to account for enrolled students who have not yet registered a score, and therefore do not yet have entries in the gradebook. We assume zero for their grades in this case and perform a simple mathematical adjustment to the average. I also updated the main courses/metrics/grades operation to use the same model method to ensure consistent responses across both calls.

@chrisndodge, @martynjames, @ziafazal , FYI on this PR now targetd for the release branch