Order hot spots by number of errors, not number of total marks

Cache the number of errors and notices for metric grades.  This should reduce complexity and improve the speed of queries.