Add spec for service_group_state and refactor starting detection.
[fixes #54048579] Make service_group_state return failing if there are
no services.