added clear history dialog (no funcionality)
fixed possible race conditions with presences
fixed #63