Changed list selection behaviour when deleting resources

This implements the change of behaviour that we discussed.  Unless you're deleting the last item, the selection index now stays the same, instead of moving up the list. 
I'm not sure if this is the best place for this code.  Maybe it should be moved in the ResourceListContainer class.