Most of the time current (based on order) system works fine, but when you add
or rename (i.e. re-sort) some ID, every data/memchunk afterward would be out
of sync and hence re-stored in memory (and reported as changed).
Now we are storing the ID's session_uuid in the memchunks, which allows to
actually always find the first memchunk for an already existing ID stored in
previous undo steps, and compare the right memory.
Note that current, based-on-order system is still used almost all of the time,
search in the new ghash is only performed for a few data-blocks (when needed at all).
Code is fairly straightforward I think.
Only design decision here is wether we actually want to generate and use the mapping
from ID's session_uuid to existing memchunks, or if we could just do a ListBase search
instead? GHash is only meaningfull in a few rare cases like addition of a huge number
of IDs within a single undo step, but on the other hand it's not really costly
to generate it either.
Please note that the debugprints are kept on purpose in this patch, they will obviously
be silenced in final commit.