Refactor, take 2

In the line of the previous changes, the LRU is now a standalone file/module, allowing it to be tested independently.

Cache has been updated accordingly.

Incidentally fix #82.