Implement database-backed application settings

This is intended to address issue #42.