Add simple multi threading library

Win32 only so far, will add pthread implementation later
Initialize and shutdown the threads subsystem
Use threads to asynchronously resolve hostnames for masterservers
Add threads lib for unix platform