Support setting security attributes on Windows

This patch adds support for setting the security attributes when creating the sockets. We use this for IPC named pipes, where we have a priviledged service that needs communicating with processes in other sessions. Comes with a little demo / test.