(#14458) Fail when cannot apply complete catalog

Under some circumstances (eg. dependency cycle) when catalog could not be
applied, Puppet didn't report failure (status unchanged, return code 0).

Raise Puppet::Error so the failure gets logged and reported (status is
"failed", return value is 1).