global-init.cxx: Fix bug #278. Clean up TLS storage key on POSIX platforms.

Patch provided by: Jörg Riesmeier <jriesmeier at users dot sourceforge dot net>
Add AbstractSocket::shutdown() and implement it for Unix-like and
Windows platforms.

Patch provided by: palladin <p-aladin at yandex dot ru>