Add core settings and a init_db function.

Also make sure to use unicode_literals where necessary.

run_devserver will now create and sync database tables on startup.