Allow dictionary 'var_deleted' callback to examine the deleted var.
The dictionary 'var_deleted' callback is the last chance to look at
a variable as it is getting deleted from a dictionary. For some of
the information in the variable, it legitimately doesn't make any
sense to get it from the variable itself at this point, e.g. the
index into the dictionary or the case, since it no longer is in
a dictionary. But for most of it, it's reasonable to get it from
the variable itself, but the callback doesn't provide any way to
do that, because it doesn't pass in the variable, just a dictionary
index that is no longer correct.
This commit changes the 'var_deleted' interface to pass in the
variable plus the information that can no longer be obtained from
the variable itself. An upcoming change to the GUI will make use
of this.
This commit also adapts all the existing users to the new interface.