bz19928: don't mutate the ItemChanges.changed set

Before we would be doing this in the backend item tracker, which created a
race condition since the frontend thread also used that set.  Replaced
mutating methods with versions that make a new copy of the set.  Also, made
the members of ItemChanges frozensets so that we will catch errors like this
in the future.