Refactor and re-enabe unittest to prepare for some speed optimisations

Preparing to make CCM fast enough for https://github.com/quattor/ncm-query/pull/5, came to the conclusion that CCM needed to run all unittests first.
Are we sure `_getConfig` will return `undef` in the case of error? Never 0, "", or other stuff that Perl treats as false?