CA-232290: Task.cancel verify permission before forwarding
CA-232290: Task.cancel verify permission before forwarding

By design, an internal superuser session will be created and used for message
forwarding to slaves, so permission checking afterwards (i.e. where the message
is already forwarded) will always return success. So we should make the
permission checking right on the front.

Signed-off-by: Zheng Li <e351a3eb690a359d8e02cebc130a21bc4c39d357@citrix.com>

jjd27/xen-api,jjd27/xen-api,jjd27/xen-api,jjd27/xen-api,jjd27/xen-api,jjd27/xen-api