cleanup data before connecting again
fix leaking client-data caused by race-condidion on remote close
Merge pull request #44 from ntruchsess/dev

fix #30, caused by leaked client.data-members when remote closed connection with no unread inbound data left. Add explicit check for state!=0 to detect this in client.close();