Make some parameters unsigned for correct overflow behaviour.
Make cJSON_malloc and cJSON_free accessible.

This is especially important when using the malloc/free hooks and
using cJSON_Print(). cJSON_Print allocates memory with cJSON_malloc and
must be freed with cJSON_free.
Add cmake project file to build a static library.