MB-5536 Fix wrong order of ep-engine objects deallocation
MB-5536 Fix wrong order of ep-engine objects deallocation

Ep-engine destructor releases tapConnMap before ep-store. However,
ep-store destruction would wait for flusher to stop, and meanwhile
dispatcher might still do work. In this case, dispatcher would
access tapConnMap and undefined behavior would happen. It should
always stop all dispatchers before releasing resource objects.

Change-Id: I92aed01b6abc1a0e08ce6f02e545ba187f67e3c7
Reviewed-on: http://review.couchbase.org/17206
Reviewed-by: Jin Lim <c45cd80a556f432a3607171a6818cd5a074b5cd4@couchbase.com>
Tested-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>
Reviewed-by: Chiyoung Seo <8b279095f11c26cc21045fda5a3e51debb005aa9@gmail.com>

abhinavdangeti/ep-engine,membase/ep-engine,teligent-ru/ep-engine,hisundar/ep-engine,jimwwalker/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,abhinavdangeti/ep-engine,daverigby/ep-engine,jimwwalker/ep-engine,hisundar/ep-engine,membase/ep-engine,owendCB/ep-engine,owendCB/ep-engine,daverigby/ep-engine,hisundar/ep-engine,abhinavdangeti/ep-engine,membase/ep-engine,sriganes/ep-engine,membase/ep-engine,hisundar/ep-engine,sriganes/ep-engine,sriganes/ep-engine,owendCB/ep-engine,owendCB/ep-engine,abhinavdangeti/ep-engine,daverigby/ep-engine,daverigby/kv_engine,sriganes/ep-engine,daverigby/kv_engine,daverigby/kv_engine,abhinavdangeti/ep-engine,daverigby/kv_engine,teligent-ru/ep-engine,daverigby/ep-engine,jimwwalker/ep-engine,teligent-ru/ep-engine,couchbase/ep-engine,couchbase/ep-engine,jimwwalker/ep-engine,couchbase/ep-engine