Add mergePut API method

:Release Notes:
Implement update if exist, insert if not logic for merge.

:Detailed Notes:
API mergePut is like merge method by query. Unlike merge,
if object doesn't exists, it will be inserted into database.

Return value:
If query will find any object, like merge it will return
how many objects it updated.

If query will not find any object, it will return inserted id and
revision of id. If props contain object ID, it will merge with existing
object.

:Testing Performed:
Compiled and tested localy.

:QA Notes:
Example of mergePut call:

luna-send -n 1 luna://com.palm.db/mergePut '{
    "query": {
         "from":"com.palm.test:1",
         "where":[ {"op":"=","prop":"foo","val": 8 }]
     },
     "props" : { "_kind":"com.palm.test:1",
                 "foo": 8
     }
}'

{"returnValue":true,"results":[{"id":"IxMtLE8ms1R","rev":2204}]}

:Issues Addressed:
[BHV-6029] upsert method - UPDATE if exists, or INSERT it

Open-webOS-DCO-1.0-Signed-off-by: Maksym Sditanov <maxim.sditanov@lge.com>

Change-Id: Ifa538519c4e88a3244dc48495dd2796d7e9507f1
Reviewed-on: https://g2g.palm.com/6181
Reviewed-by: DCO Verification
Tested-by: Maksym Sditanov <maxim.sditanov@lge.com>
Reviewed-by: Oleg Yablokov <oleg.yablokov@lge.com>
Reviewed-by: Junku Park <junku.park@lge.com>
Reviewed-by: Maksym Sditanov <maxim.sditanov@lge.com>