add support for windows daemonization

We need this because MCI has poor support for running processes in the background. It would be much better to just start a new process, write a pid, and kill it at the end.
daemonize_posix deletes its pid file on exit. Looks like that's missing here.