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. 
There's lots of duplicate code below: can you think of a way to generalize benchmarks better? (maybe wrap them in a class?) Duplicate code and benchmarks are an unfortunate combination: once the duplicate code paths accidentally diverge your benchmarks are invalid, and there's no way to detect this.