loader: GH370 - re-enable allocator usage

This reverts commit 5876cc2b7563f909c8ac8cb49f51f7ef715877f8.

This adds the previous fixes as well as additional fixes if Implicit
layers aren't present.  This is not a case that gets tested on Windows
as most SDK installs have at least 1 Implicit layer (RenderDoc).

This change passes an individual run on Jenkins Linux system.

Change-Id: I466cc54b72946e2a9f6477bd4c3d4e4e72eb9579
diff --git a/loader/cJSON.c b/loader/cJSON.c
index fc3ba04..e7266c3 100644
--- a/loader/cJSON.c
+++ b/loader/cJSON.c
@@ -88,6 +88,10 @@
     }
 }
 
+void cJSON_Free(void *p) {
+    cJSON_free(p);
+}
+
 /* Parse the input text to generate a number, and populate the result into item.
  */
 static const char *parse_number(cJSON *item, const char *num) {