Add support for Windows to vcap-common.

These are changes for Windows. Not everything is changed (fork etc) since it is not needed by dea_ng. The tests that are wrapped to not run on windows that only support *nix OS.