Replace SignatureHash() with class SignatureHasher

Is built on top of #4890.
May interfere with #4981.