Workaround for 3.6.1+ class evaluation optimization

In 3.6.1+ a class evaluation optimization was introduced that prevents
the `services_array_defined` class from being re-evaluated several times
in a loop, so the `regextract()` is only evaluated for the first service
defined. To fix this, we define per-service classes, and define
`services_array_defined` using `classmatch()` on those.

Ref: https://dev.cfengine.com/issues/6424