DESCRIPTION

JCBC-728, JCBC-731: Fix JsonLongDocument decode and counter default value.

Motivation
----------
The JsonLongDocument decoding process did not take the 0x0 flags into account,
which are used when using the counter operations (since on the server it is
stored as a string, not as a number).

Also, it was uncovered that the counter() default, different to what is documented
defaults to the incr value instead of 0.

Modifications
-------------
This changeset implements the proper decoding process of the JsonLongDocument if
the flags are 0x0 and also sets the counter default value to 0.

Integration tests are now more extensive and test the interaction of the various
counter options together with get and also an upsert operation.

Result
------
Interoperability between counter, get and upsert/insert/replace, as well as
the correct default value as advertised in the docs.

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


COMMENTS

author: Tate Garrett
date: 2015-03-16 08:29:22.636000000

Change has been successfully cherry-picked as 63629c68d42ed267d989e816f90c11f89d42375b

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