fix(handshake): on timeout emit error so we reconnect

Simon saw that handshake timeouts don't trigger a new handshake. This PR cleans up tests/server.lua to make it modular, and tests the reconnect behavior with a tweak to virgo-base.

Depends on https://github.com/virgo-agent-toolkit/virgo-base-agent/pull/82