Issue 9790 - Internal error when compiling a invalid variable in template

http://d.puremagic.com/issues/show_bug.cgi?id=9790

1. Remove gagging in `VarDeclaration::semantic`
2. Commit type in `StructLiteralExp::castTo` like as `StringExp` and `NullExp`
   It's necessary to avoid std.traits unittest breaking.