Fixed NullReferenceExcepton in Socket.Connect for non-IP endpoints

Socket.Connect(EndPoint) throws a NullReferenceException when connecting to non-IP (eg Unix) endpoints in Dgram mode.
[sgen-gray-queue] Add graystack stress test
[sgen-gray-queue] Change from index based to cursor based gray queue access to current element

This patch consist in changing the way we access the current element value in the gray queue. Before, we would save the index of the last element in the queue, then to access to the current value, we would have to make 2 memory access + 1 array offset access. Now we store a pointer to the current element, so we only need 1 memory access, thus reducing the number of memory indirection. We see ~25% speed improvement in major gc collection time on gc-graystack-stress test.
[sgen-gray-queue] Transform GRAY_OBJECT_(EN|DE)QUEUE to always inlined functions
[sgen-gray-queue] Add macros to compute first and last cursor position address on a section
[sgen-protocol] Avoid multiple inclusion of sgen-protocol.h
[sgen-binprot,sgen-gray-queue] Add binary_protocol_gray_(en|de)queue and call them on object enqueuing and dequeuing
[sgen-gray-queue] Remove compilation warning in mini-gc.c : redefinition of typedef 'mword'
[sgen-gray-queue] Add heavy statistics for allocation, and enqueue/dequeue fast/slow paths
Use <sys/select.h> to get select

POSIX mandates that select is declared in <sys/select.h> (and in the header
<sys/time.h> for compatibility). It would be best to include the new header
if it is available. This is already done throughout the source tree, though
not in all instances.

This change is released under the MIT/X11 license.
Use <poll.h> to get poll rather than <sys/poll.h>

POSIX specifies <poll.h> as the standard header that declares the poll
function. Many systems provide <sys/poll.h> to be compatible with historical
practice. Prefer the <poll.h> header over <sys/poll.h> if it is available.

This change is released under the MIT/X11 license.
Only include the <sys/param.h> header if available

The <sys/param.h> header is non-standard and usually not required if it isn't
available.

This change is released under the MIT/X11 license.
Remove unnecessary <sys/syscall.h> inclusion

Only mono/metadata/icall.c and mono/metadata/filewatcher.c include the
mono/metadata/filewatcher.h header and none of them depend on the contents
of the non-standard header <sys/syscall.h>.

This change is released under the MIT/X11 license.
Get struct timespec from <time.h> in mono/io-layer/misc-private.h

POSIX defines struct timespec in time.h and struct timeval in sys/time.h.
Some operating systems have merged these headers, but this isn't required or
encouraged by POSIX.

This change is released under the MIT/X11 license.
Use S_IWUSR instead of S_IWRITE

The S_IWRITE macro is a non-standard macro provided by some operating
systems for compatibility with BSD. POSIX specifics a standard macro with
identical semantics with the name S_IWUSR.

This change is released under the MIT/X11 license.
Avoid unused function warning in mono/io-layer/io.c

The get_fstypename function is only used by the GetVolumeInformation
function. It should be wrapped in the same #if conditional to avoid a
warning if the preprocessor conditional isn't true.

This change is released under the MIT/X11 license.
Avoid unused function warning in mono/profiler/proflog.c

The dump_ubin function is only used by the elf_dl_callback function. It
should be wrapped in the same #if conditional to avoid a warning if the
preprocessor conditional isn't true.

This change is released under the MIT/X11 license.
Use MAP_FAILED instead of (void*)-1

The MAP_FAILED macro is the standard return value of mmap() upon failure and
it is allowed to have other values than (void*)-1.

This change is released under the MIT/X11 license.
Remove MONO_SIZEOF_SUNPATH

The configure script determines the size of the sun_path member in struct
sockaddr_un. However the test is broken during cross-compilation (with a
comment that there is no macro to determine the size of struct members at
configure time) and MONO_SIZEOF_SUNPATH defaults to 0 (leading to buffer
underflows and overflows). There is no reason to determine this at configure
time when a simple traditional sizeof will do the job at compile time.

This change is released under the MIT/X11 license.
Use memset instead of bzero

There is no standard bzero function, only the standard memset function, and
Mono does not declare its own bzero function.

This change is released under the MIT/X11 license.