Use buffer of len 0 for jsoncollate encode and decode
Use buffer of len 0 for jsoncollate encode and decode

If len == cap, jsoncollate encode and decode will be
noop.

Change-Id: I1295364da1b8fb8112a5288e1c4cf5d0dfceb947
Reviewed-on: http://review.couchbase.org/43276
Reviewed-by: Deepkaran Salooja <94315e58ef7caa1d9829288fe30465d5fa6ccd83@gmail.com>
Reviewed-by: Sarath Lakshman <d41e430501c5d3aeeb2b91142f917f514040f807@couchbase.com>
Tested-by: Sarath Lakshman <d41e430501c5d3aeeb2b91142f917f514040f807@couchbase.com>

jchris/indexing,jchris/indexing,jchris/indexing,jchris/indexing