F/dbparser testing

This branch refactors the dbparser unit test program to make a bit more readable and also contains dbparser
refactors.
Well, we agree on this one, however I've just moved the code here from a different location verbatim. I think this should be fixed in a future round. I've sitting a number of patches on top of this branch and wouldn't want to introduce too much conflicts.