DESCRIPTION

JVMCBC-143: Handle query chunking everywhere

Motivation
----------
In some cases where the response is aggressively chunked, the parsing
fails because the split occurs before signature section (eg. requestId).
Late phases of the parsing are also a bit less resilient to such chunks
than errors/result section parsing.

Modifications
-------------
The parser now waits for more data if needed, at every step. It can also
detect that a section was not fully parsed and restart at correct state.
Initial parsing is also doing that.

Result parsing is less aggressively discarding read bytes, but marking a
section as done will discard its bytes.

Last section can be split across multiple chunks.

Added a test json that has every sections possible (even though in real
life this wouldn't happen). Added a test that split this response almost
at every possible position (leaving out the possibility of an empty
chunk) to validate that the parser is extra resilient.

Results
-------
Parser is now extra resilient to all kind of chunking.

Change-Id: I9f256c41e6ace8ea504353f513f042332a4e9429


COMMENTS

author: Estrella Humphrey
date: 2015-02-05 15:43:15.892000000

Uploaded patch set 1.

-------------------------------------
author: Estrella Humphrey
date: 2015-02-05 15:43:47.754000000

Patch Set 1: Verified+1

-------------------------------------
author: Natasha Sullivan
date: 2015-02-09 08:52:52.230000000

Patch Set 1: Code-Review+2

-------------------------------------
