Refactor (the use of) config.api_url
This function has several issues.
- we sometimes need the GUI url
- we have multiple APIs
- we currently use the ssl parameter to distinguish internal/external use. But even external might be without ssl (e.g. on an OASIS)