I added the id() trick because normal objects are not hashable in Python3.
Remove that hack and use a custom dict subclass that allows us to use
objects as keys as long as they don't change.
The custom dict has a different, desirable, property as well: upon seeing
keys it does not know, it just adds them to the end of the list. Will use
this feature in next commits to merge ScriptList properly.