Hashing API

Here is the Hashing API I have written as part of my GSoC project. PreferredAlgorithms includes all my benchmarks except for Signatures as that requires my SigType enum. Benchmarks are based off of what I found that was already in the codebase. 
Also, compare lengths of the hashes before comparison. Currently, `(new HashResult(type, new byte[] {})).equals(new HashResult(type, new byte[] { 0x…, … }))` holds while this clearly should not be the case.