Win32: Fix the service wrapper

This fixes the service wrapper by replacing it with one rewritten from scratch.
I tested various configurations and believe this will work, but some more QA should be done on NT 5.x platforms (XP/2003), as I didn't have any such system at hand.

Note: This will require changes to the installation procedure. The service now uses NetworkService instead of LocalSystem as its account, and will need some permissions being granted.

I ran into some bug with configure while testing this, hence I fixed it and attached the fix, too.