fix various spacings

I fixed everything I could.

There are still issues with the "space before keyword" ones because I'm not sure these are valid. You will find that `if (a)b else {}` becomes `if (a)belse {}`, which is a case where there absolutely must be a space before the `else`.