add more arch-specific MAP_ macros to bits/mman.h

these are also needed by qemu.
tcp.h: add SOL_TCP, analoguous to udp.h
fcntl.h: add some linux-specific F_ macros

thankfully these are all generic across archs.
the DN_ macros are for usage with F_NOTIFY.
bits/signal.h: add register names for x86(_64)

glibc exposes them from ucontext.h.
since that header includes signal.h, it is safe to put them
into bits/signal.h, if _GNU_SOURCE is defined.
add obsolete futimesat()

this function is obsolete, however it's available as a syscall
and as such qemu userspace emulation tries to forward it to the
host kernel.
ipc.h: fix gnu aliases for key and seq in struct ipc_perm

the macro was the wrong way round, additionally GNU defines
__ prefixed versions, which are used by qemu.
unistd.h: fix wrong type for gid_t argument

the prototype is defined with const gid_t* rather than const gid_t[].
it was already correctly defined in grp.h.
add struct msgbuf to sys/msg.h
add sigandset and sigorset (needed for qemu)
add personality syscall
add arch_prctl syscall (amd64/x32 only)
fixup for fcntl.h changes
fixup sigandset
sigandset/sigorset: do not check for NULL pointers.

that way it's consistent with existing sig* functions, and saves
some code size.
fix F_DUPFD_CLOEXEC being defined twice
fix sigorset/sigandset: _NSIG/8 is the size in bytes
fix names of ipc_perm __key/__seq elements

previously the names were exposed as key/seq with _GNU_SOURCE and
__ipc_perm_key/__ipc_perm/seq otherwise, whereas glibc always uses
__key and __seq for the names. thus, the old behavior never matched
glibc, and the new behavior always does, regardless of feature test
macros.

for now, i'm leaving the renaming here in sys/ipc.h where it's easy to
change globally for all archs, in case something turns out to be
wrong, but eventually the names could just be incorporated directly
into the bits headers for each arch and the renaming removed.
move signal.h REG_* macros under _GNU_SOURCE protection

they were accidentally exposed under just baseline POSIX, which is a
big namespace pollution issue. thankfully glibc only exposes them
under _GNU_SOURCE, not under any of its other options, so omitting
the pollution in the default _BSD_SOURCE profile does not hurt
application compatibility at all.
fix invalid read in aligned_alloc

in case of mmap-obtained chunks, end points past the end of the
mapping and reading it may fault. since the value is not needed until
after the conditional, move the access to prevent invalid reads.
fix trailing whitespace issues that crept in here and there