Fix String performance regression

Port the single byte COW heuristic from the 1.8 code path to 1.9.

This fixes #168.
Merge branch 'string-optimize' of git://github.com/dmarcotte/jruby into dmarcotte-string-optimize