connection struct that wraps around conn and reader for thread-safety

Move functions - readResponse, fprintf, redial to have a connection
pointer receiver; This way each client operation(lock, unlock) has an independent connection