This is the problem whereby opening the spin viewer window, deleting a residue, and then reopening
the spin viewer crashes relax.
This change completes the spin viewer update_*() functions. The prune_list variable was initialised
but not used. Now it is used to store the keys of the items to delete, and then the items are
deleted at the end in a new loop so that the loop over the dictionary keys is not corrupted.