Add support for server alternative ports

If connecting to the server's main port fails, the client will
automatically attempt to connect on the alternative port. If connecting
on the alternative port is successful, this is recorded in localStorage
so that next time, the alternative port is used first.

This is mainly intended to be used by the main server, which has a
primary port of 8000 and a relatively little known alternative port
of 80.