CTFE: Allow creation (but not reading) of unions

It's currently possible to create unions in global scope but not in CTFE.
We can't support reading or writing members, but creation is OK.
CTFE: Allow VectorExp as a no-op
Fix bug 10252 CTFE: Generate error for shr/ushr/shl out of range

Use same behaviour as for const-folding.
Fix bug 10251 CTFE: Allow returning pointers to global statics of known value

Don't expand pointers to global variables.
They should stay as a SymOffExp, even if their value is known.
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.
Don't rerun semantic for const template parameters
Fix bug 10217 ICE(root.c) with nested struct.init.tupleof in CTFE

CTFE version of bug 9315, almost exactly the same fix.
If a nested struct has no initialized hidden pointer, set it to null
to match the runtime behaviour.
Fix issue 10198 CTFE struct Multidimensional block assignment

The wrong CTFE behaviour was actually coded into a test in test42.d.
It was clearly wrong because it behaved differently depending on where the
initialization was performed. That test is fixed in this commit.
CTFE: allow const casts of struct literals

This was permitted in const-folding, but not in CTFE until now.
Do all interpreting inside CTFE

instead of in the optimizer
If an error occurs in an ExpInitializer, change it to an error.
Forward referenced const as template value parameter

The problem is that the constness of the variable hasn't
been determined yet, so it will fail CTFE.
Not sure if this is correct (see also bug 10075).
Fix enum member type

When creating a variable from an enum member, the type is known from the value.
CTFE: Fix bad pointer casts
CTFE: &global -> SymOffExp

optimize() changes AddrExp(globalvar) into a SymOffExp.
But optimize() isn't always called before CTFE, so do it here too.
CTFE: run semantic on global variables

Only seems to happen with forward-referenced globals
Detect recursive initialization in CTFE const folding

This should actually be detected in the CTFE compilation step.