fixes for handling of contact groups

Deletion test & prevention of crash on accessing a group after deletion.

OSX-specific fix for changing group name.