MB-8029 Make json collator input parameters const

This is the most correct semantically. The collator is not
supposed to modify its operands. Also pass the operands as
a pointer rather than by value.

Change-Id: I6d8b5769f7c4fd5cfa3781555d1fc71bc14083c9
Reviewed-on: http://review.couchbase.org/25590
Reviewed-by: Fulu Li <fulu@couchbase.com>
Reviewed-by: Volker Mische <volker.mische@gmail.com>
Tested-by: Filipe David Borba Manana <fdmanana@gmail.com>