Improve the forced reconnect code in the init_command test.

Instead of using a timeout to trigger a connection close, explicitly kill the connection.
Instead of testing the return value of ping for reconnect, test that the connection ID changed.