DESCRIPTION

JVMCBC-176: Handle errors in views properly after rows.

Motivation
-----------
The current streaming parser was incorrect in the assumption that either
errors or rows are emitted from a view response. In fact, the error
can optionally come after the rows are emitted. If no errors are emitted
an empty list of rows is presented.

Modifications
-------------
The streaming parser has been changed to "listen" onto an error block
which might be there after the rows have been emitted. If not, the
code has not changed. If errors are emitted, the error block is
executed and passes them on into a new error observable which needs
to be consumed by the clients properly.

Test have been aded to verify it works under the given scenarios. These
include both empty and non-empty rows.

**NOTE**: language bindings need to change their code so that the
errors are fed out of the explicit error observable and not out
of the rows/infos.

Result
------
Errors are properly separated from the rows segment and moved onto
a separate error observable.

Change-Id: I09b82e301452e14afc1ed87dcc1b70a0bfd5b626
Reviewed-on: http://review.couchbase.org/48924
Tested-by: Natasha Sullivan xxx@xxx.xxx
Reviewed-by: Estrella Humphrey xxx@xxx.xxx


COMMENTS

author: Gerrit Code Review
date: 2015-04-01 12:12:12.063000000

Change has been successfully cherry-picked as 8759779ebf9dfddfd2b18f81957b1e527c471899

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