This method computes the tree hash used by glacier. It reads the whole stream and then resets the
position of the stream back to the beginning.

- stream (Stream)
- The stream to read and compute the tree hash for.

The tree hash that can be used to set the the Checksum property.