Added a general HashingStream decorator.

ReadIntegrityStream now extends HashingStream. Fixed issue #5, where keeping track of the $lastHashPos was causing problems.