Fix num_unread*2 on minimized chat

When chat was minimized the counter num_unread of unread message was increment when receiving a compose message so the number of unread messages was doubled.
Merge pull request #267 from Deuteu/message-counter-fixes

Fix num_unread*2 on minimized chat