Windows: restructure daemon state tracking