Refactored db_get_metadata to return a dictionnary to easy further
manipulation.
Refactor db_insert_all to the more generic db_executemany since now it
will be used for deletes too.