Fix random failures in test 'wait_timeout' that depend on exact timing.
1. Force a reconnect initially if necessary, as otherwise slow startup
might have caused a connection timeout before the test can even start.
2. Explicitly disconnect the first connection to remove confusion about
which connection aborts from timeout, causing test failure.
- Detect that connection to server has been broken in "net_clear". Since
net_clear is always called before we send command to server, we can be sure
that server has not received the command.