initial work on sqlite support

needs a GUI implementation in the installer and some more refinement
(switch the db connect in init etc) but basically it works :)