Add naive method to invalidate nscd caches when databases change

TODO: Check whether system has nscd and whether it is running.
Also unit tests.

Fixes #47 but is currently rubbish, however this might annoy someone enough that they improve my code.
i don't like constructs that do `if (not something) { X } else {Y}`; if the else block is present, just make it `if(something) {Y} else {X}`