compiler: Support for typed trampolines

Instead of always building a trampoline using the TopProcedureType build
a trampoline for the target type. This uses a generalised version of
PlanProcedureTrampoline that can deal with arbitrary incoming
signatures.
compiler: Support for procedure types in unions

This adds the concept of "adapter procedures". These are like normal
trampolines except they store the actual target procedure cell inside
their closure. This allows them to adapt other procdure cells instead of
just known procedures.

The planner now keeps track of these adapters in a new
adapterProcTrampolines. The same trampoline can be reused for different
adapter procedures that are adapting the same types.

Inside IntermediateValue determine if we're converting between unions
containing different procedure types and creating an adapter procedure
as required. This adds a fair amount of overhead when dealing with
procedure type union conversions but they should hopefully be rare in
practice.
stdlib: Add proc types to exception procedures

This ensures that the exception procedures are passed lambdas of the
correct type. It also generates slightly better code.
compiler: Add proc types to (dynamic-wind)

- Promote ThunkProcedureCell to a proper binding type. It's used
  frequently enough the stdlib to deserve a central definition

- Make (dynamic-wind) take a thunk procedure cell for all of its
  arguments
Add typed converter procedures

This adds an explicit type to converter procedures. When optimisation is
enabled this allows them to be invoked more efficiently and their arity
to be checked at compile time.
compiler: Fix adapaters without rest args

If an adapter without rest args was adapting a procedure with rest arg
and their fixed arg count matched we'd generate an bad Invoke call.
Handle this case and add a functional test.
stdlib: Add proc types to control procedures

This adds typed procdures to (call/cc) and (call-with-values). This
fixes a serious bug where (call/cc) would take a value of <any> and
attempt to apply it as a procedure, resulting in a segfault if the value
wasn't a procedure.
compiler: Don't explcitly cast in PlanInvokeApply

The planner can no longer have procedure types with differing Scheme
types and signatures - casting to another Scheme type will create an
adapter procedure. This means we're no longer required to check that the
applied operands match the Scheme type.