Performance improvements for TaggedCache and KeyCache

Create a new Beast class, `beast::hashed_key` which wraps around a key type, and adds support for hash caching and optimizes key comparisons by comparing hashes before performing (potentially expensive) comparisons of the underlying keys. 

Use code in `ripple::TaggedCache` and `ripple::KeyCache` to move the hashing outside of locks and reduce the number of times hash functions must, actually, be called.