Fixes #617: Provide a configuration file
This implements a configuration file, with the following priority:
- if there's an env variable set, it's used (that ensures backwards compatibility for some time).
- if it's defined in the config file, use it.
- otherwise, try to find the best default value according to context (cozy or standalone).
Any reviews appreciated, as usual :)