Fix link of runtime tests
runtime: Add ReturnValues and RestValues

These are templated aliases for ProperList that is intended to be used
to clarify the signature of stdlib procedures. The signatures for the
existing procedures should now be updated to use the new classes.
runtime: Fix outdated block and comment

llbase_apply doesn't need the wrapping block to enforce scope anymore
compiler: Propagate types in (let-values)

This will pass in the appropiate types from argument list to (apply) or
(call-with-values) on an inline lambda even if the contents of the list
aren't known. This is enough to (let-values) to properly propagate the
the types to the values it binds.

- Introduce PlanApplication.planWithOperandList that will attempt to
  build a list of operand values from the passed list. This is stronger
  than the previous KnownListElement logic in ValuesProcPlanner in that
  it will also work for lists with unknown contents but an exactly known
  length

- Have planWithOperandList call planWithOperandValues if it can
  successfully extract operand values. This is important as
  planWithOperandValues knows how to inline SELs

- Attempt to inline self-executing lambdas even when optimisation is
  disabled. This is required to propagate the types from our values.

- Update ApplyProcPlanner and ValuesProcPlanner to use
  PlanApplication.planWithOperandList
stdlib: Implement SRFI-1 (partition)

This is implemented in C++ as tail recursive procedures returning
multiple values are very inefficient: in addition to our lists we'd have
to allocate two temporary pairs for each iteration. Instead use
two StrongRefVectors in C++ and build the final result lists at the very
end.
compiler: Introduce cell_checked_cast

This is a variant of cell_cast provided by core/error.h that raises an
error if the cast fails. This is a generalisation of cell_map_cast used
internally by llbase_map
runtime: Reduce heap allocations in (map) etc

In (map), (vector-map) and (string-map) and their for-each variants we
were allocating a new rest argument std::vector for every iteration.
Instead move the std::vector out of the loop and reuse it between
iterations.
compiler: Don't check if rest list is proper

With mutable pairs we were using TempValueToIntermediate to build the
incoming rest argument in PlanProcedureTrampoline. This would convert
the rest argument type to <list-element> which would cause the list's
properness to be checked again when passing to the target procedure.

We know the rest list cannot be modified inside the trampoline so
directly create an iv.CellValue of the correct type.
compiler: Fix ValuesToList length hint

ValuesToList was calculating its list length hint with the assumption
that the passed terminator was an empty list. However, if it was a list
itself this would calculate the wrong as the length of the tail list
wouldn't be included.

Fix to only pass a length hint if the terminator is a known list
element.
stdlib: Implement (fold)

This implements (fold) as described by SRFI-1. Internally it's
implemented in a similar fashion to (map) but can't share much
implementation besides the new cell_checked_cast<> helper.
compiler: Support polymorphic procs in inner scope

Polymorphic type annotations were only allowed when defining top-level
procedures. This caused the frontend to error out whenever it
encountered a polymorphic procedure in an inner scope. Fix by allowing
ModuleBodyExtractor to use a polymorphic type in any position by
converting it to the upper bound.