switch to c++11 and cleanup

:Release Notes:

:Detailed Notes:
Cleanup code and prepare for SandwichDb engine

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I31fa5f1af04e05e09346f2c2c38933474ba2fb8f
Reviewed-on: https://g2g.palm.com/5533
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Improvements for tests and valgrind fixes

slightly improve run of tests and disable unstable
make assert/expect for MojErr more detailed
partially migrate CrudTest to gtest
fix mem allocation and some logging

:Release Notes:
Fixed curedump on x64 in Release build exposed by MojDbCrud and
moj_db_performance tests. Also fixed minor issues of printing
uninitialized values which were reported by valgrind.

:Detailed Notes:
- Allocated memory should always have alignment suitable for any type.
  Ensured that this is true.
- Removed/replaced printing of uninitialized values with a more
  suitable values in leveldb-based engines.

:Testing Performed:
unit-tests on desktop. test_db_core and test_core under valgrind 3.8.1

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I3799db26b6ea492aa966ccb99f6ce32b36404685
Reviewed-on: https://g2g.palm.com/5534
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
multiengine support

:Release Notes:

:Detailed Notes:
Add engine factories auto-registration
Add support for multi-engines testing

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I3b40539c2e88ec987e744b75c5eeaed779a3ba1a
Reviewed-on: https://g2g.palm.com/5535
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Switch to a single LevelDB file per database

:Release Notes:

:Detailed Notes:
Add Sandwich-Db layer

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: I3ac19b99e4c450956b903c5bfc7cd74a082a747b
Reviewed-on: https://g2g.palm.com/5536
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Sandwich engine TXN support

:Release Notes:

:Detailed Notes:
Add TXN support for Sandwich engine

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I5929d51928660b06fdbce4c9bc91199471c8eae0
Reviewed-on: https://g2g.palm.com/5537
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Make gtest_db_core to use default engine

:Release Notes:
set default engine "sandwich"
fix for MojDbStorageEngine to use defualt engine
remove unused defines

:Detailed Notes:

:Testing Performed:
unit-tests on desktop.

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I7ea89ebb0bdfcad97666f9df281d15ed2ed25827
Reviewed-on: https://g2g.palm.com/5538
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Do adhoc cleanup in sandwich storage

:Release Notes:

:Detailed Notes:
cleanout table-txn from sandwich

:Testing Performed:
Tested on desktop and TV

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I57b10e2f00fcebb440f2fd4b3f91ef2d9d9e61ed
Reviewed-on: https://g2g.palm.com/5539
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Cleanout MojDbSandwichCursor

:Release Notes:

:Detailed Notes:
Cleanout MojDbSandwichCursor

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I7a2e98d50866c07b1dda28189856fc26a1c44065
Reviewed-on: https://g2g.palm.com/5540
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Explicit logic in MojDbSandwichQuery

:Release Notes:

:Detailed Notes:
explicit logic in MojDbSandwichQuery

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: Ie48c6964b0135fc669b9ea86ae7cd251dec9f88e
Reviewed-on: https://g2g.palm.com/5541
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Ensure that each MojDbDumpLoad works with own file

:Release Notes:

:Detailed Notes:
Currently when this test is run for multiple engines in parallel it may
produce an error caused by creating/writing/reading/removing the same
files in two processes. So moved it folder of test database.

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: Ie0848b8ee3cc609f60a5310961eabc585f612651
Reviewed-on: https://g2g.palm.com/5542
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
MojDbPerfTestRunner now works with unique in /tmp

:Release Notes:

:Detailed Notes:
With /tmp mounted on tmpfs this change kicks out hdd effect from
results.

:Testing Performed:
Tested on desktop

:QA Notes:

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: I7ca073af206f40bb4b4cbea9b9abe83d973c17f4
Reviewed-on: https://g2g.palm.com/5543
Reviewed-by: DCO Verification
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Multiengine support in DB8

:Release Notes:
Add multiengine support
By default would be used sandwich-db layer

:Detailed Notes:
On the start db8 engine would check database-directory and try to identify which one engine should be used for this database.

:Testing Performed:
Tested on TV with custom build

:QA Notes:

:Issues Addressed:
[BHV-7606] Migration tool

Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>

Change-Id: Ie87d3d91eb09325067e2564ed31560387fbbff16
Reviewed-on: https://g2g.palm.com/5636
Reviewed-by: DCO Verification
Tested-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Reviewed-by: Igor Kuksyuk <igor.kuksiuk@lge.com>
Reviewed-by: Olexandr Solomakha <oleksander.solomakha@lge.com>
Singledb support

:Release Notes:
Add singleleveldb support into DB8

:Detailed Notes:
Multiengine support in DB8
MojDbPerfTestRunner now works with unique in /tmp
Ensure that each MojDbDumpLoad works with own file
Switch to a single LevelDB file per database

:Testing Performed:
Tested on TV with custom build

:Issues Addressed:
[BHV-2627] [DB8] Switch to a single LevelDB file per database

Open-webOS-DCO-1.0-Signed-off-by: Oleksandr Solomakha <oleksander.solomakha@lge.com>
Open-webOS-DCO-1.0-Signed-off-by: Nikolay Orliuk <nikolay.orliuk@lge.com>

Change-Id: I3a8cbaa1f6afe91f0a8abbebdfee140e64a547a9