Changed PiClient to using NIO/Non-blocking sockets.

Now the thread can be interrupted at any time because the reading and writing to the socket wont block the PiClient
Fixed unused import statements
Will send and receive messages from the server.