Forces Windows (Vista and above) shutdown to wait qBittorrent to terminate cleanly

This pull request is related to issue #1535 

Starting from Vista, Microsoft has changed the shutdown management.
This patch tries to avoid the brutal kill of qBittorrent process before its clean termination.
This is exactly the way I would like to follow too. But, instead to rely directly on GetProcAddress success, I would like to implement a specific check using GetVersion fuction or something similar. This, at least, should avoid a failure debug message where it is not a real failure.