Replace python's greedy tooltip wrapping with hill-walking algorithm in JS.

git-svn-id: http://blockly.googlecode.com/svn/trunk@1674 c400ca83-b69d-9dd7-9705-49c6b8615e23