copy/fine-tune databaseManager.js from MmApiCore, integrate to ImageService_test.js, integrate log4js including pipe-separated custom logging format
add back Marek's commits
clean up git snafu on ImageService_test.js and databaseManager.js