daemon: Add support for running as a service on win32
This MR adds support for natively running PA as a service on Windows. The state is stored in the common app data (ProgramData) folder with DACLs for having similar behavior as other platforms. See https://pgaskin.net/pulseaudio-win32/.
Is this suitable for inclusion in PulseAudio?
- Minimal implementation of --system on win32.
- Wrap main with a Windows Service on win32 (with a fallback to running it directly).
- Update PA_SYSTEM_{RUNTIME,STATE,CONFIG}_PATH and HOME dynamically on Windows (overrides the build config, similar to the existing config path replacement logic).
- Add DACLs for directories created by system daemon.
Requires !546 (merged).
Edited by Patrick Gaskin