Changed server connection to store port and key and to have a helper for connection
Finally fixed write_string so it compiles now
Added heartbeat thread
Made server disconnect after missed heartbeats
Made getattr only query connected servers
Merged heartbeat to master.