After calling CancelIo, wait for all IO operations to finish before closing handles and freeing OVERLAPPED structures.
Merge pull request #21 from roniegh/960ae8d58e3b94aa8ca897b7efe2340adc167a86

After calling CancelIo, wait for all IO operations to finish before closing handles and freeing OVERLAPPED structures.