Windows support

* Adding graceful termination signal for Windows platforms.
* Fixing tests to run in Windows.