CA-139894: Fix waiting for VM.remove

Due to a change in semantics of UPDATES.get, task_wait would
occasionally not wait.

This also adds back in error handling into the VM.remove path.

This is a backport of commit 3eb967b7a62ceaa7257b2a7a8b1ee0c0170ca418
from xenopsd.git

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>