Fix Socket Shutdown_TCP_CLOSED_Success test (dotnet/corefx#23975)
This test has been failing at times with an exception being generated
from the client socket due to the loopback server terminating the
connection with RST instead of FIN.
The problem is that the server socket needs to use Shutdown() before
Dispose() to ensure a clean FIN after the data gets sent back to the
client.
Fixes dotnet/corefx#13539
Commit migrated from https://github.com/dotnet/corefx/commit/
338ddc649308c7e3b97a37c8803a1cc5e5e3bd59