lock iconLoadedSet when adding/removing objects

and do `unloadIcon` outside the existing lock so they don’t deadlock