services.cf refactoring

For history and additional details, see the old PR in https://github.com/cfengine/core/pull/860.