cmd/compile: eliminate dead code in if statements after typechecking
This is a more thorough and cleaner fix
than doing dead code elimination separately
during inlining, escape analysis, and export.
Unfortunately, it does add another full walk of the AST.
The performance impact is very small, but not non-zero.
If a label or goto is present in the dead code, it is not eliminated.
This restriction can be removed once label/goto checking occurs
much earlier in the compiler. In practice, it probably doesn't
matter much.