Initial commit of work to use mariadb to store what has been downloaded.

Currently there is a problem where the connection stays open unless explicitly
calling .end() but doing that then causes an error to be thrown.