Unix: fix UDP ReuseAddress with non .NET Core UDP clients (dotnet/corefx#32046)
* Unix: fix UDP ReuseAddress with non .NET Core UDP clients
.NET Core sets SO_REUSEPORT to enable reusing the address with other
sockets. This works when the other sockets also set SO_REUSEPORT.
SO_REUSEADDR can also be used for this. When one application uses
SO_REUSEADDR and another uses SO_REUSEPORT, the second application
will fail to bind.
To implement SocketOptionName.ReuseAddress we need to set both options.
This enables sharing with applications that set SO_REUSEPORT,
SO_REUSEADDR or both.
* Fix comment
* wording: share -> reuse
* Add test
* Fix test on mac
* Move DllImport to separate file
* Add separate csproj Configurations for Windows and Unix
* Add Windows and Unix to Configurations.props
Commit migrated from https://github.com/dotnet/corefx/commit/
0ec9c9d7caac1ac378e2135620bf2f8b80e6ed86