fix flaky test EXPECT_EQ code, using EXPECT_FLOAT_NEAR per Jeff
fix flaky math functions, remove unnecessary instantiations.
Merge pull request #1264 from Yangqing/dev

Clean flaky code
some namespace simplification
Merge pull request #1269 from Yangqing/dev

Minor change: some namespace simplification
move registration code to corresponding cpp files.
Merge pull request #1270 from Yangqing/dev

Give back to layer what is layer's, and to factory what is factory's
Revert "OpenCV should be compiled using pkg-config options." -- breaks
compilation on working systems

This reverts commit 4587b2f9043996fed36fc989c00329ec829ecae9.
some namespace cleaning.
Merge pull request #1277 from Yangqing/dev

some more namespace cleaning.
Refactored leveldb and lmdb code.
Some cleanup to make travis happy.
Updated interface to make fewer string copies.
Don't autocommit on close for the databases.  If they were read-only, then they might fail.
data layer test was relying on the autocommit on close db behavior that was recently removed.
Updated cifar10 build script to specify db backend.
Switched create_cifar10.sh output from leveldb to lmdb.
Updated extract_features to take a leveldb/lmdb config option.
Updated Database interface to use custom KV type rather than std::pair.  Removed two buffer copies in dereference operation for DB iterators.
Added a couple of sanity checks to make sure the datum buffer sizes matched what we expected.