Adjusted search(), startsWith() not to run off end of buffer when
checking two-byte sequences.
Adjusted VM tests to use two-byte init sequences.
Fixed some bugs in generating the best 2-byte factor. Added tests.