support an external database

this replaces the previous sqlite-only setup with one that supports an
external mysql database.  You can provide the following via environment
variables:

KEYSTONE_DB_USER
KEYSTONE_DB_PASS
KEYSTONE_DB_HOST
KEYSTONE_DB_NAME

Alternately, to support something other than mysql, you can pass a
complete connection string in as:

KEYSTONE_DB_URI