Multiple fixes and small additions

Fixed appdb saving, now done on timer.
Fixed Skype display named used instead of a Skype user handle on some
places (mainly appdb).
Made the code update the chat master key before a new user is invited.
Made the code update the chat master key periodically.