db: Fix enormous leak

Disclaimer: The author (me) clearly had a bad day, but that can't really
account for a freaklishly large leak as this one. Especially when the
function in question is specifically designed to *free* allocated
memory.

With that in mind, new tests will be added to the tree for BudgieDB.
Remaining leaks are purely within GTK + GStreamer.