Port StringBuffer to JS.
Bitshift instead of multiply; remove impossible case; add comment for use of "16".
Add additional tests, with fixes for edge cases.
Use "th.check()" in the added StringBuffer tests.
Merge pull request #367 from mcav/stringbuffer

Port StringBuffer to JS.