windows: properly close the default loop

Also close the IOCP handle for any loop.

Closes #393
test: add test for closing and recreating default loop