Change to use MySQL db instead of files on the server.

Now uses a MySQL database to store keys. Server details configurable in
config.php, files rewritten to reflect the change.