Modify *_put functions to always take ownership

:Release Notes:
Changed jobject_put() and jarray_put() functions to take ownership in
spite of return status.

:Detailed Notes:
jobject_put() and jarray_put functions are assumed to take ownership
of the given key and value objects, bit in case of error they are not
taking the ownership, so memory leaks if the user forgets to call
j_release(). This change should get rid of potential memory leaks and
make value management less tricky.

:Testing Performed:
Unit tests
Manual test on TV (miniBAT)

:QA Notes:

:Issues Addressed:
[GF-9986] libpbnjson: Refactor jobject_put and jarray_put() to take ownership even in case of error

Change-Id: I6af27ee514abb18b1bb8f7115f67f0681f03e9db
Open-webOS-DCO-1.0-Signed-off-by: Tigran Avanesov <tigran.avanesov@lge.com>
Reviewed-on: https://g2g.palm.com/3509
Reviewed-by: Tigran Avanesov <tigran.avanesov@lge.com>
Tested-by: Tigran Avanesov <tigran.avanesov@lge.com>
Reviewed-by: Build Verification
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Tested-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>