Added some rudimentary dump() methods for threads.
Fixed a bug that could create cyclic References.

E.g. when trying to unify A and B whilst both refer to the same
store node.
Fixed: forgot NamedName and UniqueName in LiteralLike and NameLike.
Temporary commit.