Making sure that we don't have a deadlock when disposing an embedded doc...

...ument store with http server enabled.