Add method to get db version info + test case.

The test case checks if the major and minor DB versions are the same at
compile time and run time. This might help debug obscure bugs in the
future.
Removed whitespace over all files.