Add testcase for Redmine #6577

This verifies that functions are not evaluated if they are used
in a promise that is skipped via ifvarclass.

This is not a bug in master, and this test passes with 3.6.2 as well,
but there is a bug in 3.6.x due to code that explicitly tries to
skip function evaluations in disabled proimses (the redmine ticket).
Fixing the bug by removing that code, and including this test to
ensure that we don't regress wrt function evaluations.