Improve const-folding error msg for static variables

The error message for an attempt to read a runtime variable
from optimize(WANTinterpret) is less informative than the CTFE one.
Improve the optimize() version, so that the test suite is ready for
the change to using CTFE throughout.
CTFE: Improve error message for static assert

by running optimize(0) first.
Currently static assert uses optimize(WANTinterpret) for const folding. This has
the side-effect of simplifying the expression before evaluating it, which makes
error messages nicer. If we simply change to using CTFE instead, the error
messages won't get simplified. So insert a call to optimize(0) before running CTFE.
Merge pull request #2117 from donc/ctfe_harmonize_errormsg

Make CTFE error messages same as for const-folding