use flask.ext.script to make module runnable

flask.ext.script provides an extension mechanism which will be used for
database migrations.
centralise application configuration

Having all of the configuration in one place provides scope for mocking
when tests are written.