orchestrator/global: Fix deadlock on updates
orchestrator/global: Fix deadlock on updates

The updater is wrongly called from inside a store transaction, which can
lead to a deadlock if an update is already running. The new update tries
to cancel the running one, but that existing update may be stuck trying
to start a store transaction and therefore the new update waits forever
for it to stop. To fix this, keep track of tasks that need to be
updated, and call the updater outside the transaction.

Signed-off-by: Aaron Lehmann <8ecfc6017a87905413dcd7d63696a2a4c351b604@docker.com>

deljuven/swarmkit,dperny/swarmkit-1,allencloud/swarmkit,dperny/swarmkit-1,deljuven/swarmkit,cheyang/swarmkit,AliyunContainerService/swarmkit,RenaudWasTaken/swarmkit,alyyousuf7/swarmkit,elifa/swarmkit,fate-grand-order/swarmkit,diogomonica/swarmkit,cheyang/swarmkit,diogomonica/swarmkit,aaronlehmann/swarmkit,yongtang/swarmkit,AliyunContainerService/swarmkit,yongtang/swarmkit,Noyan759/swarmkit,docker/swarmkit,RenaudWasTaken/swarmkit,alyyousuf7/swarmkit,fate-grand-order/swarmkit,sungwonh/swarmkit,jlhawn/swarmkit,elifa/swarmkit,docker/swarmkit,jlhawn/swarmkit,sungwonh/swarmkit,aaronlehmann/swarmkit,Noyan759/swarmkit,allencloud/swarmkit