Rewrite comment attachment code to be significantly faster.

To attach each comment to the appropriate node, the new algorithm performs
a binary search at each level of the tree, rather than sorting a list
containing all the nodes and all the comments in the AST.

For a large file like test/data/backbone.js with lots of comments, this
reduces comment attachment time from 90ms to 27ms, a 70% improvement.

For a file with relatively few comments, the comment attachment process
becomes almost free.

Closes #116.