RemoteController: Use state machine instead of rebinding handlers

Replace the three sets of handlers (with somewhat-overlapping
functionality) with a state variable and a single set of handlers.
RemoteController: Formalize state machine a bit
Abstract out backoff timer handling
RemoteController: Reconnect control connection if it fails at runtime
Show warning icon when RemoteController connection is dead
Reduce control connection ping timeout

Ping the server every 3 seconds and give up after 9.
Drop unused import
RemoteController: Always renotify states after reconnection

Even if the state hasn't changed since the last connection, whatever
action the UI took in response to the previous notification may not have
reached the server.
Disconnect viewer when network disconnects

Otherwise the viewer may be frozen for a long time before it realizes
its connection is dead.
Disable restart button while network is disconnected