check-mod-fixnum: correct the test for power-of-two.

Testing for the power of two was performed on a fixnumized number,
causing the optimization for power-of-two to be never applied.
Fix instruction encoding for XMM shifts with immediate count

 x86 keeps getting more and more devious: the source/dest operand
 is in the r/m field for these instructions, so REX.B must be set,
 rather than REX.R, to access > xmm7. Intel's new documentation
 seems clearer about these issues, at least.
Grovel timeval and timespec struct definitions rather than hard-coding.
Hopefully fix the windows build to grovel time structures correctly.

It is a little misleading to say "correctly" since struct timespec
doesn't really exist on windows. Groveling the definition that we
define in our own pthreads wrapper seems the most consistent choice.

The grovel-headers.c changes have only been tested in isolation, not
with a real build. Thanks to Kyle Isom for testing, any resulting
build problems are entirely my fault.
backtrace: don't cons large lists when RCX is overwritten inside XEPs.

To present a list with the actual number of passed arguments in the
backtrace, clean-xep used the arg-count register and added missing
arguments in the form of #<unknown>, but if the register is
overwritten by other code, it could cons very large lists, exhausting
heap. Do such arg-list clean up only upon INVALID-ARG-COUNT-ERROR.
Fixes lp#1192929.
Simplify EMIT-GENERIC-VOP.

Since there's only one kind of templates now, there's no need for
indirection. Rename EMIT-GENERIC-VOP to EMIT-VOP, remove EMIT-FUNCTION
slot from TEMPLATE, call EMIT-VOP directly.
Simplify EMIT-VOP further.

EMIT-VOP is only ever used in conjunction with INSERT-VOP-SEQUENCE, by
returning two values: first and last VOPs, all linked together,
INSERT-VOP-SEQUENCE then inserts them into the block. But nowadays
EMIT-VOP always returns the same VOP as the second value.
* EMIT-VOP now returns one value, the emitted VOP.
* INSERT-VOP-SEQUENCE is renamed to INSERT-VOP, accepts only one VOP.
* A new function EMIT-AND-INSERT-VOP is added, which combines them,
  and is used anywhere where EMIT-VOP was used.

This makes things less complicated, and reduces core size by 32KB, the
same as the previous commit, for a total of 64KB of savings
essentially for free.

(Also squeeze a couple of line-break fixes)
Update URL of "Long, Painful History of Time"

Previous URL was not available anymore (404 error)
Also rewrapped the paragraph to the same width as the others
Use sb!ext:print-symbol-with-prefix in implicit-generic-function-warning.

 and export this useful function from sb-exr.

 Slight mangling by Paul Khuong.
Make the printing of a slot-unbound error more error tolerant.

Especially against errors coming from custom PRINT-OBJECT methods, in which
case only print the TYPE-OF the instance. Also, print fully qualified
symbol names.

Slightly modified by Paul Khuong.
Provide more info in debugger-disabled-hook.

Before this change if there was an error printing the condition object,
then we didn't even try printing the backtrace afterwards, which can be
a useful source of information even if the condition printing has failed.

Some modifications by Paul Khuong.
Wrap the body of sb-debug:backtrace with with-debug-io-syntax.

 Added with-debug-io-syntax macro.

 Some whitespace changes as well.
In MAKE-THREAD, use WITH-SYSTEM-MUTEX for locking *MAKE-THREAD-LOCK*

Otherwise MAKE-THREAD could be interrupted after having
locked *MAKE-THREAD-LOCK*. If the interrupting code also called
MAKE-THREAD, a recursive lock attempt for *MAKE-THREAD-LOCK* would
occur.

The problem could be easily triggered by

  (MAKE-TIMER ... :THREAD <T or a thread>)

Also move let bindings of SETUP-SEM, REAL-FUNCTION, ARGUMENTS and
INITIAL-FUNCTION and the NOT *GC-INHIBIT* assertion out of the
critical section.

Tests have been added in threads.pure.lisp and timer.impure.lisp.

fixes lp#1180102.
Defer some sanity checks to after testing for value refence to inline functions

 The functional corresponding to an inline function can be marked as dead when
 there remains references in for-value contexts.  Detect such references before
 making sure the function is still live.

 Reported with a reduced test case by Teemu Likonen to sbcl-devel on 2013-06-24.
New contrib: SB-GMP

 This contrib was developed by Stephan Frank to replace some of our
 bignum and rational arithmetic code with calls to libgmp.  Simply
 loading the contrib will transparently accelerate arithmetic on
 large rationals when libgmp is available; if libgmp cannot be found,
 the contrib should change nothing.

 The contrib also wraps additional functions in GNU MP, so that they
 accept and return SBCL-native integers or ratios.  See GNU MP's manual
 for more information.
double->single float conversion isn't a no-op on x87 anymore

 The conversion can result in overflow, so pass through a stack
 temporary to force a truncation.

 Test case by Peter Keller on sbcl-devel, 2013-06-26.
Store FP values from x87 to the heap outside pseudo-atomic

 It suffices to get the header right, and that way we avoid signaling
 FPEs in PA, when, as is bound to happen, a value is only truncated
 when it's boxed.
s/32/n-word-bits/ in bignum-index

 For some reason we missed that during all the work on x86-64. Then
 again, our static inference is good enough that no runtime check
 seem to be left to detect that the declaration is wrong.
Fix a typo in the block comment on encoding/decoding universal times

 Might as well, while we're updating URLs.

 Spotted by Luis Oliveira.
Fix SLEEP on 32-bit platforms.