Restore gdb-server cleanup handlers for MinGW

There were removed in my previous commit 5851dee due
to compilation errors. It actually appears these signals
are supported in MinGW but there was an include error for
MinGW, this commit fixes it.
Fix all compilation warnings
Merge pull request #185 from ouah/master

Restore gdb-server cleanup handlers for MinGW