Making sure that we don't have a deadlock when disposing an embedded document store with http server enabled.