added message reader and tests
added events and socket to message reader
added end / error / message listeners
improved message logging
read/write logging
reconnect loop