taskqgroup_detach() would remove the task even if it was
running or enqueued, which could lead to panics (see D17404). With
this change, taskqgroup_detach() drains the task and sets a new flag
which prevents the task from being scheduled again.
I've added grouptask_block() and grouptask_unblock() to allow control
over the flag from other locations as well.