Interpret failing function calls in ifvarclass/if/unless as class not set.

ifvarclass is treated explicitly during the evaluation of a promise.
Function calls might fail due to unexpanded variables in arguments or
for other reasons, in which case the classes should be assumed not to
be set.

Remove unused function in eval_context.c, make static equivalent
in promises.c, where it is used.

Include acceptance test.

Fixes Redmine 6327. Can't be cleanly cherry-picked into 3.6.x.
Merge pull request #1924 from vohi/redmine/6327

Redmine 6327 - Interpret failing function calls in ifvarclass/if/unless as class not set