Move the compstate configuration to Flask config

This means two things that help in running the system from WSGI:

1. It doesn't try to parse CLI arguments when used as a WSGI module, and:
2. Standard WSGI config can be used to pass in the comp state directory.