Add safepoint mechanism

  * Stop threads for GC at safepoints only.

  * Replaces use of SIG_STOP_FOR_GC.

  * Currently not used by default.  Users need to set feature
    SB-SAFEPOINT to enable this code.  SB-SAFEPOINT should only be set
    when SB-THREAD is also enabled.

  * ISA support: Each architecture needs VOP support, and changes to
    foreign call-out assembly; only x86 and x86-64 implemented at this
    point.

  * OS support: Minor changes to signal handling required, currently
    implemented for Linux and Solaris.

  * Performance note: Does not currently replace pseudo-atomic entirely,
    except on Windows.  Only once further work has been done to reduce
    use of signals will pseudo-atomic become truly redundant.  Therefore
    use of safepoints on POSIX currently still implies the combined
    performance overhead of both mechanisms.

  * Design alternatives exist for some choices made here.  In particular,
    this commit places the safepoint trap page into the SBCL binary for
    simplicity.  It is likely that future changes to allow slam-free
    runtime changes will have to go back to a hand-crafted address
    parameter.

  * This feature has been extracted from work related to Windows
    support and backported to POSIX.

Credits: Uses the CSP-based stop-the-world protocol by Anton Kovalenko,
based on the safepoint and threading work by Dmitry Kalyanov.  Use of
safepoints for SBCL originally researched by Paul Khuong.
Use safepoints for INTERRUPT-THREAD

  * In INTERRUPT-THREAD, stop threads using safepoints instead of
    signals.

  * Currently not used by default.  Users need to set feature
    SB-THRUPTION to enable this code.  SB-THRUPTION should only be set
    when SB-SAFEPOINT is also enabled.

  * This feature should ultimately be rolled into SB-SAFEPOINT, but
    remains as a separate build option until both versions are equally
    well-tested, and until other avoidable uses of signals have also
    been replaced by safepoints.

  * On the term "thruption": Earlier work on this feature sometimes
    used "interrupt" to refer to INTERRUPT-THREAD, causing confusion
    with the traditional meaning of "interrupt" as POSIX signal or WIN32
    exception.  To avoid such confusion, the runtime now refers to
    INTERRUPT-THREAD as a "thruption", short for th(read) (inter)ruption.

  * SIGPIPE is not used for threads running Lisp code, but a low-level
    handler for SIGPIPE still exists which arranges for threads running
    FFI code (in particular, threads blocked in poll, select,
    futex_wait) to be interrupted.

  * OS support: Minor changes to signal handling required, currently
    implemented for Linux and Solaris.

Credits: This is a POSIX backport of Windows threading changes by
Anton Kovalenko and Dmitry Kalyanov.
Factor out most x86 code using the FS prefix into a macro WITH-TLS-EA.

The macro expands into the exact same forms it replaces at the moment.

Windows threading will be able to plug into this macro with few changes,
and notably much reduced read-time conditionals.
Remove executable mode from several source files
Mention SB-EXT:EXIT instead of SB-EXT:QUIT in docstrings, etc.

Suggest SB-EXT:EXIT instead of SB-EXT:QUIT in help string in
%INVOKE-DEBUGGER

Refer to SB-EXT:EXIT instead of SB-EXT:QUIT in docstring of
SB-EXT:SAVE-LISP-AND-DIE

Refer to SB-EXT:EXIT instead of SB-EXT:QUIT in docstring of
SB-EXT:*EXIT-HOOKS*
Add some missing launchpad references to NEWS.
Add a section about random number generation to the manual.

Document initial random state consistency, how to achieve or avoid
repeatability of random numbers, extensions with respect to seeding,
generation of random floats, and the currently used PRNG algorithm.

Move the docstring of SEED-RANDOM-STATE over from the "Miscellaneous
Extensions" section.
Fix the build on Darwin

 * Darwin's assembler doesn't have default values for .fill directives.

 * Only use call_into_lisp_tramp on darwin/x86, not darwin.

 * Edit NEWS to note that threads have been OK on 10.8 since 1.0.58,
   while we're here.
More efficient (stable) sort of lists

 * (Reverse-) Sorted runs are mostly processed in linear time;

 * Calls to the :key function are cached;

 * Base cases now include specialised sorts for lists of
   length 3 and shorter.

 * Minimal test case for stable sorting.
Add type declarations in stable-sort-list

 * I'd copied some code from a preliminary development version.
Fix test-case for bug-511072 in packages.impure.lisp

It was creating an error in an additional thread and didn't handle it
properly, which caused SBCL to bail out.
Reported by Mirko Vukovic.
sb-bsd-sockets: Package clean up.

sb-bsd-sockets-internal: Don't use sb-c-call package, it's a
deprecated nickname for sb-alien, and sb-alien is already
used.
sb-win32-sockets-internal: Remove, not used anywhere.
disassemble: New customization variable sb-ext:*disassemble-annotate*.

sb-ext:*disassemble-annotate*: Controls whether to annotate
DISASSEMBLE output with source forms, defaults to T.

Also remove an unused function.
Define _GNU_SOURCE when building contribs on Linux.

sb-posix:o-direct doesn't get grovelled without it.
Reading floats with large exponents no longer takes too much time.

Reading 1.0s1000000000000000 will attempt to construct a very large
bignum, which takes a considerable amount of time just to report in
the end that it cannot be represented as a float. Truncate the
exponent to manageable size before raising it.

Fixes lp#309070. Thanks to Paul Khuong for the help.
add SSE instructions with two opcode bytes

This patch just introduces the formats, some helper functions, and most
of, if not all of, the xmm-xmm/mem ones.  There's still quite some
interesting instructions left to add.
align inline constant section with long nops

Makes the disassembly much nicer, particularly at speed > space.
make SOCKET-RECEIVE work correctly when receiving overly-long UDP packets

Only copy as much data as the provided buffer can hold.  Continue to return
the length provided from recvfrom as per documentation.

Fixes lp#1023438.  Thanks to Robert Uhl for the fix.
Ignore an argument in x86's EMIT-CONSTANT-SEGMENT-HEADER

Fixes the build on this platform.
interrupt.h: Remove rtmin[01]_handler forward declarations

Left in accidentally from an earlier POSIX safepoint idea.