database: Convert our use of database files to save in tagstruct format.
This has the advantage of allowing versioned updates in the future,
thus allowing us to be more user friendly going forward (as opposed
to just ignoring entries from old versions).
The primary motivation for this, however, is to allow variable length
storage in each entry which will be needed for upcoming work.
At present this commit will ignore any legacy entries but support
for reading and subsequently converting legacy entries will be added
shortly.