rewrite db stuff to example43 syntax

the whole db thing still needs thinking. I haven’t decided if the db may
be hosted external or not. This probably has to be possible so I might
end up doing something drastic about this whole dilemma (don’t know
what yet though).
fix legacy syntax errors
simplify server initialisation
refactor to use more hiera2