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. 
This construction is unsafe: even though nothing seems to use `PreferredAlgorithms.random` at the moment, it would be bad if any class could just go ahead and specify a random source to be used by *all* code that may use it in the future: there's nothing we can do to prevent some code from supplying a random source that always returns 5 (or 42, if that's more random).

Also, since the variable it modifies is already `public static`, there's no point in supplying a method to change it (other code could just assign to this static variable).

I'd suggest removing this method *and* the `random` variable now we still can without breaking code.