avatars: fix duplication glitch when switching accounts
There was a timing issue between when a new account is connected
and the moment where the avatar cache is cleared. Thus, the ui
would use the cache of the previous account for certain
conversations.
GitLab: #1832
GitLab: #1559
Change-Id: I0319b3d81e0b6dfec9b5408806dfd48ff220ea9d