Added an option to hash messages stored in gather registry to save some memory

This requires crypto++ library, and can be turned off from cmake.