support for running on Windows. factored out socket_open().

Windows doesn't have domain sockets, so I've added support to use TCP sockets on Windows, with a configurable override, useInetSocket so this can also be tested on non-windows platforms.

I factored out the socket_open function which was duplicated. 

Finally, avrdude failed with the path generated because of mixed slashed -  like c\arduino-1.0.4\hardware/arduino/tools. Fixed the instance root to use just one type of slash.

I do my primary brewpi development on windows, and I'm sure others will like the opportunity.