Fix pending messages and deliver offline storage after subscribed (should close #103)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>
Turn available presences into unavailable presences when taking over presence data from another server (should fix #120)

Signed-off-by: Daniele Ricci <daniele.athome@gmail.com>