consul: set task name only for group service checks
This PR fixes a bug introduced in a refactoring
https://github.com/hashicorp/nomad/pull/10764/files#diff-56b3c82fcbc857f8fb93a903f1610f6e6859b3610a4eddf92bad9ea27fdc85ec
where task level service checks would inherent the task name
field, when they shouldn't.
Fixes #10781