rewrite codegen for c for loops

The previous code was pretty ugly and this is a slight improvement. The
previous version dealt with block stmts nested within each other and being
passed a general expression.

What the function attempts to do is generate each segment of a c for loop
correctly, while using our current codegen code. When we generate statements
they get pushed on a cStatement list and they have semicolons and new lines.
For c for loops we want to generate these statements as comma separated code
instead. The previous version looked for places we might generate statements
and popped them back off. For --no-local there are statements we generate
depending on if something is wide and what context it is being used in. Rather
than recreate that logic, the new approach just checks the number of statements
before and after codegenning an expr and then pops all of the new statements
off.