fixed frozen GUI caused by popups
fixed client crash on removing friends. Closes #1077
Merge remote-tracking branch 'upstream/0.6' into mod