Improve rest_listen_uri and rest_transport_uri configuration

The current default configuration setting for `rest_listen_uri` is set to `http://127.0.0.1:12900/`. There is no default setting for `rest_transport_uri` in the configuration and thus it is set to the IP address of the first non-localhost interface. This causes problems for new users because the web interface cannot reach the server API.

Following changes should improve the situation:

1. If `rest_listen_uri` is set to `127.0.0.1` and `rest_transport_uri` is not set, also set `rest_transport_uri` to `127.0.0.1`.
1. If `rest_listen_uri` is set to `0.0.0.0` and `rest_transport_uri` is not set, use the IP address of the first non-localhost interface as `rest_transport_uri`.
1. If `rest_listen_uri` is **not** set to `127.0.0.1` or `0.0.0.0` and `rest_transport_uri` is not set, use the `rest_listen_uri` IP address for `rest_transport_uri`