refactor to detect number of tokens

refactor buffer parsing to use a state machine and detect
the number of tokens. This means we can better replicate the regex impl
that did not reverse string comparisons if both buffers have less than 2 tokens.

change timestamp comparison to use ByteBufferUtil instead of creating
longs to improve performance a little

Note: This detects a~~1 as two tokens, the reg would detect 3. I think this
may result in bugs in edge cases. If there is less than 2 tokens in each
buffer the full buffer are compared without reverse. If there is more than two but they can not be turned into longs the full buffer is compared with
reverse.

So we probably need to change the state machine to detect the same number of tokens.

Times for running the throughout test 10 times on my MBP 2011, 16GB, SSD

Previous implementation

Throughput test 493 ms for 200000 comparisons
Throughput test 88 ms for 200000 comparisons
Throughput test 106 ms for 200000 comparisons
Throughput test 70 ms for 200000 comparisons
Throughput test 70 ms for 200000 comparisons
Throughput test 118 ms for 200000 comparisons
Throughput test 91 ms for 200000 comparisons
Throughput test 74 ms for 200000 comparisons
Throughput test 71 ms for 200000 comparisons
Throughput test 71 ms for 200000 comparisons

Reg Ex

Throughput test 665 ms for 200000 comparisons
Throughput test 349 ms for 200000 comparisons
Throughput test 397 ms for 200000 comparisons
Throughput test 307 ms for 200000 comparisons
Throughput test 310 ms for 200000 comparisons
Throughput test 307 ms for 200000 comparisons
Throughput test 312 ms for 200000 comparisons
Throughput test 314 ms for 200000 comparisons
Throughput test 311 ms for 200000 comparisons
Throughput test 315 ms for 200000 comparisons

Zero Copy all ByteBufferUtil comparison

Throughput test 479 ms for 200000 comparisons
Throughput test 85 ms for 200000 comparisons
Throughput test 107 ms for 200000 comparisons
Throughput test 70 ms for 200000 comparisons
Throughput test 68 ms for 200000 comparisons
Throughput test 118 ms for 200000 comparisons
Throughput test 81 ms for 200000 comparisons
Throughput test 67 ms for 200000 comparisons
Throughput test 67 ms for 200000 comparisons
Throughput test 65 ms for 200000 comparisons

Zero Copy with cassandra LongType comparison

Throughput test 489 ms for 200000 comparisons
Throughput test 84 ms for 200000 comparisons
Throughput test 99 ms for 200000 comparisons
Throughput test 61 ms for 200000 comparisons
Throughput test 62 ms for 200000 comparisons
Throughput test 111 ms for 200000 comparisons
Throughput test 82 ms for 200000 comparisons
Throughput test 63 ms for 200000 comparisons
Throughput test 62 ms for 200000 comparisons
Throughput test 62 ms for 200000 comparisons

Zero Copy with java long comparison

Throughput test 514 ms for 200000 comparisons
Throughput test 107 ms for 200000 comparisons
Throughput test 125 ms for 200000 comparisons
Throughput test 99 ms for 200000 comparisons
Throughput test 87 ms for 200000 comparisons
Throughput test 135 ms for 200000 comparisons
Throughput test 106 ms for 200000 comparisons
Throughput test 85 ms for 200000 comparisons
Throughput test 87 ms for 200000 comparisons
Throughput test 84 ms for 200000 comparisons

Calling BytesType.compare

Throughput test 448 ms for 200000 comparisons
Throughput test 49 ms for 200000 comparisons
Throughput test 41 ms for 200000 comparisons
Throughput test 60 ms for 200000 comparisons
Throughput test 30 ms for 200000 comparisons
Throughput test 30 ms for 200000 comparisons
Throughput test 66 ms for 200000 comparisons
Throughput test 60 ms for 200000 comparisons
Throughput test 29 ms for 200000 comparisons
Throughput test 29 ms for 200000 comparisons