Remove Dispose race condition

Added a very complex unit test that demonstrates the issue. Testing this
shit is hard.
Added EncryptedBlobCache to race condition test