Massive performance improvement to the dialogue_cm_unread_total function that provides the total unread count for a dialogue on the course view page