Patch to https://bugs.launchpad.net/calibre/+bug/1207131

Fix the issue of renaming user categories to the same name it already has resulting in deletion of the category (see https://bugs.launchpad.net/calibre/+bug/1207131)