Reorder startup ops

Register shutdown! callback immediately after server is started, so that
if an errors occurs in connect_client! we can still shutdown
Shutdown if we can't establish a connection to the server
More tries to connect with increasing backoff
Remove last .swp file
Ignore .swp files