Add config.py

This should allow action functions, auth functions, template helper
functions etc. to be defined in their own modules, but still be able to
access the config settings without circular imports.
Move get actions into get.py
Move upsert action into update.py.