Port tests to windows and add to cmake build.

Some tests fail on windows, looks like mostly unsupported stuff like ipc, will look at in another pull request.