remote_thr.cpp: port pthreads usage to win32 api

Also add in simple Makefile for mingw32 builds.
- DLL can be built
- perf directory can be built