midiogre: use GQueue instead of list_t
midiogre: implement db import
libdb: codestyle + cleanup