Evict registers from the cache based on LRU.

The old method would always evict the first suitable register, i.e. the
same register every time once the cache got full.  The cache doesn't get
terribly often, but the result is pathological...
Merge pull request #949 from comex/eviction-policy

Evict registers from the cache based on LRU.