Add destroy to a task's allowed_operations

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>
Move task_status_is_completed to TaskHelper

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>

Conflicts when merge to clearwater-sp1-lcm:
	ocaml/idl/ocaml_backend/taskHelper.ml
	ocaml/idl/ocaml_backend/taskHelper.mli
	ocaml/xapi/db_gc.ml

Signed-off-by: Zheng Chai <zheng.chai@citrix.com>
Don't destroy tasks that aren't complete

Signed-off-by: Jon Ludlam <jonathan.ludlam@citrix.com>