unix: add Eventfd function on Linux

Add support for the eventfd2 syscall on Linux.

Use the eventfd2 syscall instead of eventfd, as the latter does not
provide a flags argument and glibc also maps its eventfd() function to
the eventfd2 syscall, see the Notes section in
http://man7.org/linux/man-pages/man2/eventfd.2.html

Also add the corresponding flags values EFD_CLOEXEC, EFD_NONBLOCK and
EFD_SEMAPHORE.

Change-Id: Ia8c99e68d5966ab5c7ebe7e45423943fd7d8214e
Reviewed-on: https://go-review.googlesource.com/45093
Reviewed-by: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
24 files changed