libpbnjson: Fix memory leak in generator

:Release Notes:
Fix memory leak in JGenerator
Add memory leak samples to the regression tests

:Detailed Notes:
Any call to JGenerator's toString() or serialize() results in a memory
leak.
Reason: jvalue_ref are shared without reference counting, the stack of
the objects being parsed isn't unwinded on failure and so on.
Solution: accurately recycle unused memory.

:Testing Performed:
Valgrind memory check

:QA Notes:

:Issues Addressed:
[GF-7251] pbnjson::JGenerator::serialize leaks memory
[GF-8329] Memory leak in pbnjson

Open-webOS-DCO-1.0-Signed-off-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>

Change-Id: I3d8ebefb36a92e5aae4b52c3a67452b844a7bc28
Reviewed-on: https://g2g.palm.com/2793
Reviewed-by: Build Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>