Fix CTFE version of bug 9315

If a nested struct has no initialized hidden pointer, set it to null
to match the runtime behaviour.
Don't run CTFE on template parameters

It's guaranteed to fail, it's been passing only because it was a no-op.
If this succeeds, we can probably remove the code that this is duplicating.
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).
CTFE: &global -> SymOffExp

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