Function to convert composite keys to json array.

Change-Id: I18c1208a6b20a6d9688e05a7860822d1268c3be1
Reviewed-on: http://review.couchbase.org/38321
Reviewed-by: John Liang <johliang00@gmail.com>
Reviewed-by: Pratap Chakravarthy <prataprc@couchbase.com>
Tested-by: Pratap Chakravarthy <prataprc@couchbase.com>