controller/worker: Fix deployment event race
controller/worker: Fix deployment event race

We were previously sending the deploy complete event before marking the
deployment as done, meaning the client may try and perform another
deployment and get an error as one is still in progress.

Signed-off-by: Lewis Marshall <748e1641a368164906d4a0c0e3965345453dcc93@lmars.net>

philiplb/flynn,philiplb/flynn,flynn/flynn,philiplb/flynn,lmars/flynn,lmars/flynn,flynn/flynn,lmars/flynn,flynn/flynn,lmars/flynn,flynn/flynn,philiplb/flynn,lmars/flynn,philiplb/flynn,flynn/flynn