Fix #79: Avoid duplicated history on rejoining.

The xmpp module now tracks incoming messages, and cuts off
the room history when rejoining a room to avoid duplicates.

Note: This feature very much relies on client and server
time being synchronized.