Remove redundant checks after memory allocations

:Release Notes:
Avoid useless checks after g_new(), g_strdup() to simplify the code.

:Detailed Notes:
Glib promises to terminate the process when not enough memory for
g_malloc(), g_new(), g_strdup() and similar. So there's no point in
checking what these functions return.

:Testing Performed:
Unit tests under valgrind.
Tested on device and in emulator.

:QA Notes:

:Issues Addressed:
[GF-43049] pbnjson: Remove redundant checks after memory allocations

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

Change-Id: I34f9f9fe6473ad9a577727baf7343320d8d81018
Reviewed-on: https://g2g.palm.com/3701
Reviewed-by: Build Verification
Reviewed-by: Mykola Kryvonos <mykola.kryvonos@lge.com>
Tested-by: Mykola Kryvonos <mykola.kryvonos@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Tested-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Keith Derrick <keith.derrick@lge.com>
Improve JSON schema validation performance

:Release Notes:
Generic singleton validators for basic types is used if there is no need
to keep validation information to increase validation speed and reduce
memory usage in certain cases.

:Detailed Notes:
All specific features of validators (properties, default values etc.)
are now applied by validator = feature_apply(validator, feature)
signature which automatically create new instance of validator to store
feature if needed.
Separate type for integer validator is used during schema parsing to
indicate type independently of validator inner structure

:Testing Performed:
Unit test with valgrind

:QA Notes:

:Issues Addressed:
[GF-42811] pbnjson: Implement more static objects to improve memory
           footprint

Open-webOS-DCO-1.0-Signed-off-by: Mykola Kryvonos <mykola.kryvonos@lge.com>

Change-Id: If2387385fbe5d9d34f293be3cf2ee4082e98b654
Reviewed-on: https://g2g.palm.com/3633
Reviewed-by: Build Verification
Reviewed-by: Mykola Kryvonos <mykola.kryvonos@lge.com>
Tested-by: Mykola Kryvonos <mykola.kryvonos@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Add comparison functions to JSON C API

:Release Notes:
Implemented jvalue_equal comparison function for JSON value in C API.

:Detailed Notes:

:Testing Performed:
Unit test with valgrind

:QA Notes:

:Issues Addressed:
[GF-44132] pbnjson: Expand jvalue C API to support JSON values
           comparison

Open-webOS-DCO-1.0-Signed-off-by: Mykola Kryvonos <mykola.kryvonos@lge.com>

Change-Id: I68200e9b6c16bfc01395976175a191f1b752d6c0
Reviewed-on: https://g2g.palm.com/3752
Reviewed-by: Build Verification
Reviewed-by: Mykola Kryvonos <mykola.kryvonos@lge.com>
Tested-by: Mykola Kryvonos <mykola.kryvonos@lge.com>
Reviewed-by: Anatolii Sakhnik <anatolii.sakhnik@lge.com>
Reviewed-by: Alekseyev Oleksandr <alekseyev.oleksandr@lge.com>
Fix incorrect enum behaviour with common prefixes

:Release Notes:
Fix checking against enum when alternatives are prefixes of another
ones: {"enum": ["Array", "ArrayExt"]} should validate both "Array"
and "ArrayExt", for instance.

:Detailed Notes:
Fix string comparison to check string lengths before resorting to
strncmp(). Weaken enum from "oneOf" to "anyOf" for sake of performance.

:Testing Performed:
Added unit tests for regression.
Run under memory checker.

:QA Notes:

:Issues Addressed:
[GF-44469] pbnjson: Incorrect enum behaviour when one string is a prefix

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

Change-Id: Ia0d70f2baccbc3a1dc8f5a611fd9bb2b3c2588c0
Reviewed-on: https://g2g.palm.com/3765
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>
Reviewed-by: Mykola Kryvonos <mykola.kryvonos@lge.com>