DESCRIPTION

JCBC-985: Fix fts errors handling/parsing, querystring, highlight

Motivation
----------
During the REVIEW phase, the following problems have been identified
with FTS RFC that affect the implementation:

 - StringQuery should be QueryStringQuery
 - there is an additional plaintext error case: HTTP 412 when a
 consistency is requested but cannot be fulfilled within the timeout
 - highlight style is actually optional
 - errors is not an array but an object, and when it is present, hits
 can be null

Modifications
-------------
 - StringQuery has been renamed to QueryStringQuery, and the static
 factory method from string to queryString.
 - highlight now has several overloads that can omit the style. when
 used, the style is actually set to new special enum SERVER_DEFAULT.
 - HTTP 412 case leads to a ResponseStatus.FAILURE, which is now
 interpreted as a FtsConsistencyTimeoutException
 - HTTP 200 with execution errors now parses both a JsonArray and a
 JsonObject. The case where hits is null is also handled.

Added unit tests and integration tests, most notably for the error
handling cases.

Result
------
The error handling of FTS is more correct (and a bug with it is fixed).
Other comments from rfc review have been taken into account.

Change-Id: Iefd877582e8001a5f06477520cc687a98a900c4b


COMMENTS

author: Estrella Humphrey
date: 2016-07-08 16:40:27.027000000

Uploaded patch set 2: Commit message was updated.

-------------------------------------
author: Cory Peck
date: 2016-07-11 06:55:10.907000000

Patch Set 2: Code-Review+2

-------------------------------------
author: Tate Garrett
date: 2016-07-26 09:21:45.835000000

Change has been successfully cherry-picked as 2654a7ab26e25e7cbfa19b6eb9bb0055c2877bff by Estrella Humphrey

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