CCBC-376: cJSON: fix memleak

Change-Id: I2ce43a4c21a865669008f6c1a609fec9c55f2d76
Reviewed-on: http://review.couchbase.org/36081
Reviewed-by: Brett Lawson <brett19@gmail.com>
Tested-by: Mark Nunberg <mnunberg@haskalah.org>
(cherry picked from commit 77a1140c229397cb125b87798cf98feb7086fed6)
Reviewed-on: http://review.couchbase.org/36235