Set not-kept classes when promise should be repaired, but is warn-only

There are probably more cases where Log instead of cfPS is used and
that are not covered by this fix, but this covers the immedate
issues as reported and covered by the test case.

Test case originally submitted as https://github.com/cfengine/core/pull/1311,
but merging here with the already existing test case.

See Redmine #2359.
I am puzzled by your uses of ifelse().
https://docs.cfengine.com/docs/master/reference-functions-ifelse.html
Unless I'm missing something, `ifelse(arg)` is just a complicated alias for `arg`.
Did you have something else in mind ?