Added WaitOnStop flag.
Added WindowsServiceLoopBase.