make sure we lock the cache shards while we clean them, closing #1910. Plus add regression test that pretty reliably
detects us not locking.
Merge branch 'master' of github.com:PowerDNS/pdns