LRUCache optimisation

This improves LRUCache performance pretty substantially (particularly for the multithreaded case) while keeping the same basic algorithm as it had before. I'm afraid the bulk of the work is in a single commit, because the rather wandering path I took to get to this point didn't make sense as individual commits. I have however added a lot of documentation to the private members which hopefully does a pretty decent job of explaining what's going on - so it probably makes more sense just to read the final result rather than look at the diffs.
It's not impossible to change, but I think it'd be at the expense of simplicity in the API. The only ways I can think of off the top of my head are to provide another argument to set()/get() or have some funky mechanism for extracting "the real key" from the "the key those weird LRUCache client classes are using to pass sidecar data to the getter". It would be pushing the weirdness into the public API of the LRUCache rather than keeping it hidden behind the scenes in that client code. Did you have any other ideas as to how it might be done more cleanly?

If we did address this, I think it would be better done in a separate pull request, as it's orthogonal to this one, which is all about optimising for speed.