Centralized the generation of hash values for links into a static class method of ImtLink, so that it can be called from other classes, and so that it's easy for me to tweak it if necessary. Previously there was a possibility that two different pairs of ids could accidentally result in the same hash, but I've fixed that by adding some wrapper characters.