windows: Fix various memory leaks.

This fixes bug #419.
windows: Indentation (cosmetics only).