Minify: Fix a performance issue
Minify: Fix a performance issue

Github user @paul-rouse reported a performance issue minifying
expressions like:

   var y='a'+1+'a'+1+......+'a'+1;

which seems to have a runtime of 4^n where n is the number of values
summed together.

A large part of the problem was that the parser for the above expression
generates a degenerate binary tree. The solution was to balance the tree
just before minification. It might have been nicer to do this in the
parser, but then managing the annotations needed for round tripping
would have been more difficult.

Closes: https://github.com/erikd/language-javascript/issues/58

alanz/language-javascript,alanz/language-javascript