Another attempt at fixing metadata storage (+bump version)

More thorough work that includes a re-factor, somewhat better test
coverage and a get_or_add function that uses a while loop to protect
against the possible race condition of key expiration after cache.add
and before the subsequent cache.get.