Modernize js2c.py.

- Fix all PEP8 violations.
- Use "is" operator only to check object identity. For example:
  |if len(line) is 0:| only works with small integers. See [1]
  for more info.
- Use |i += 1| instead of |i = i + 1|
- Use list comprehensions and generators if possible.

[1] https://github.com/berkerpeksag/notes/blob/master/python/idioms.md#-vs-is