Add test for failed_returncodes

When kept_returncodes or repaired_returncodes are specified failed_returncodes is not defaulted properly.

Ref: https://dev.cfengine.com/issues/5987