Extended use of IDisposable API
Wrapped context in using() in tests
Reduce resource cache size for unit tests

This prevents the unit tests from chewing up too much memory as they
create a lot of small stores.