Improvements to dialogues list presentation

For your consideration, here are a few commits that help improve the presentation of the dialogues list when neither participant in a particular dialogue is the viewing user. For example, in a course with more than one teacher, the participants of a dialogue become unclear in the dialogue list if the student initiated the dialogue. In our institution the preference is to show the non-teacher, but in a student-initiated dialogue it is the teacher who is listed for other course users with mod/dialogue:manage permission rather than the student.