Fix issue with ropes in writer

We were constantly appending to the current line string. We then did
s.charCodeAt(s.length - 1) which, when the string is a rope is O(n)
where n is the number of internal strings. We did this on every
append. The code is now refactored to keep track of the last char
code so we never have to go through the rope.

This also removes the feature to highlight a node and print line
number comments.

Also, removed some branches in hot code.

Fixes #1596
I'll add a comment.

The problem is not just with writing spaces. We need to know the last character in `write_` too.