XmlDocument created for incoming/outgoing messages

Moved the multiple connection streams to a struct. This change cleans
the code, and helps keep it organised. Also deleted the message thread,
replacing it with an async model in the socket accept loop. This loop
also now checks to see if any connection requests are pending before
trying to accept one to prevent the thread from blocking.

Incoming data is now parsed into an xml document, with a switch occuring
on the type node. A response xml object is created, and if the incoming
message was unknown a failure message is returned