Fix order of notes in email notifications based on user who triggered the action

https://www.mantisbt.org/bugs/view.php?id=17925

Proposed fix
Handle the case where new user id == old user id.  In such case we shouldn't flush the cache.