Fix empty JSX expressions sometimes emitting erroneous commas

Fixes https://github.com/facebook/react/issues/1216

It is technically possible to significantly simplify the code, but it would come at the cost of no longer being in control of where `,` ends up, which is something we do want to control.