We got some errors when some of the key values exceeded the Xapian maximum; in particular the message-id. So make all the key-methods check, and truncate the message-id if necessary.