Simplify hash function

We can rely on fast multiplication and good compilers.

v2: use default FNV-1a prime

Signed-off-by: wm4 <wm4@nowhere>
Signed-off-by: Grigori Goronzy <greg@chown.ath.cx>
Append new cache items at the start of the collision list

The idea is that more recently-added cache items are more likely to
get hits.

Signed-off-by: wm4 <wm4@nowhere>
Attempt to make code more readable

No more double pointer dereferencing.