Micro-optimize vector creation.

transform-make-array-vector expanded into
(allocate-vector typecode (the index length) (ceiling length x))
but the transform applied to CEILING before it was known that LENGTH
is of type INDEX was producing bad results,
(ceiling (truly-the index length) x) solves that.
Optimize CONCATENATE transform.

Avoid redundant type-checks, avoid passing unnecessary arguments to
REPLACE.
Better printing of out of range --dynamic-space-size arguments.

Stop printing unsigned values of dynamic-space-size as signed, %lu, not %ld.
Instead of "argument 4000 is too large, max 4143972351", print
"argument 4000 [MB] is too large, max 4046847 KB".
Fix output streams on Windows for GUI executables.

Direct *STDIN*, *STDOUT*, and *STDERR* to NUL on Windows when the
standard handles are not available.

Patch by Wilfredo Velazquez. Fixes lp#125603.
Linux/MIPS uses "unsigned long" instead of dev_t in struct stat

Handle rdev the same way as dev.
Add :application-type parameter for save-lisp-and-die on Windows.

Allows to choose the executable subsystem type, :console or :gui.
Default is :console.
Remove a workaround in bit-vector consets

FOLD-INDEX-ADDRESSING was fixed in 1.0.9, and there is no compiler bug
anymore on FIND of bit vectors with :END, even at low safety.

When attempting to bootstrap from an older x86oids SBCL, the :END
argument can be commented out without affecting correctness.
Let OFFSET-CONFLICTS-IN-SB check multiple offsets at a time

Instead of calling that function within a loop. Now returns the
offending offset if any, instead of a plain T. It probably doesn't
make that much of a difference, but we might as well factor it out
and recycle some pointer chasing at the same time.
Convert an ASSERT into an AVER in INIT-LIVE-TNS
Fuller error message in PACK-WIRED-TN

Cribbed directly from Alexandra Barchunova's regalloc work.
Fix a logic bug in TNS-CONFLICT-GLOBAL-GLOBAL

That function was never used, so it's not a correctness issue, but
it's useful (when correct) to debug register allocation.
Parameterise ASSIGN-TN-COSTS to make writes more important

*TN-WRITE-COST* determines the weight given to writes when computing
the cost for allocating a TN on the stack. It defaults to 2, versus
1 for reads.

Also, hoist some special lookups out of loops.
Generalise ASSIGN-TN-DEPTHS to expose the reduce function

By default, this still computes the maximum loop depth at which a
TN is accessed, but, e.g., changing that to #'+ will compute the
sum of the depths at which the TN appears.

Also, process all the references to each TN at a time, instead of
walking down the list of IR2 blocks to update every TN that appear
in each block.
Yank DO-TARGET-TNS out of FIND-OK-TARGET-OFFSET

Also, try to make the logic a bit more understandable, but I'm
frankly as baffled as everyone else.
New function SB-IMPL:SCHWARTZIAN-STABLE-SORT-LIST

Stable sort because we really ought to avoid normal sort if we want
reproducible builds, and a Schwartzian transform because we sometimes
sort with fairly computation-heavy sort keys.  Better have that to
make it easy to DTRT.
Use SCHWARTZIAN-STABLE-SORT-LIST in SELECT-LOCATION

LOOP in a :KEY function may not be the best idea.
Utility predicates for packing: UNBOUNDED-SC-P and UNBOUNDED-TN-P

Determine if the backing storage base (or the preferred storage
class for a TN) is :UNBOUNDED, i.e., on the stack.
Microoptimise TN-LEXICAL-DEPTH
Actually optimize in PACK-TN

We used to track location usage information, but never use it to
determine which register to use.  I'm not actually convinced that
this change improves the quality of the code we generate, but it
can't hurt for PACK-TN to actually do what it says it does: usage-
guided packing can always be disabled if it's not useful.
Simplify (and robustify) regular PACKing

* Make sure that only wired TNs are allocated to stack locations
  until the final pass.

* When using loop depth to prioritise TNs, find them by iterating over
  the list of TNs, instead of reprocessing global TNs that appear in
  multiple IR2 blocks.

* In the final pass that allocates leftover TNs (mostly to the stack),
  make sure that any TN with a negative spill cost (i.e., the score
  says it's actually useful to spill it) is allocated a stack slot.