Fix Diamond takes a while to stop (issue #595)
Fix Diamond takes a while to stop (issue #595)

Rework shutdown logic so that the SyncManager is last to terminate.

We need the SyncManager to terminate last since the other processes depend on
it. When it's not there, those other processes crash and as a result, the parent
process never gracefully shuts down.

tusharmakkar08/Diamond,skbkontur/Diamond,gg7/diamond,gg7/diamond,MichaelDoyle/Diamond,skbkontur/Diamond,skbkontur/Diamond,gg7/diamond,python-diamond/Diamond,python-diamond/Diamond,skbkontur/Diamond,MichaelDoyle/Diamond,MichaelDoyle/Diamond,MichaelDoyle/Diamond,gg7/diamond,tusharmakkar08/Diamond,tusharmakkar08/Diamond,tusharmakkar08/Diamond,python-diamond/Diamond