Testcase for defaults promises

Classes promises trigger a re-evaluation of the bundle's variables
to resolve dependencies quickly. This overrides and thus breaks defaults,
promises which have already been evaluated.

Why the test case has to be so complicated, testing both for positive
and negative outcome explicitly, is beyond me. Probably because bundle
return values are not just terrible to use, but also implemented in
some fascinatingly complex way.

See redmine 5748
Evaluate defaults promises again after classes promises

Since we re-evaluate variables to resolve dependencies between
classes and variables quickly, we also need to re-evaluate defaults
promises again.

Fixes Redmine 5748

This includes the refactoring from e92efc5458117c4988ddb8c815c72a017bd5f981
Merge pull request #1979 from vohi/redmine/5748

Fix Redmine/5748 - make defaults promises work in bundles using classes promise