compiler: Make report procs return intermediates

Previously ReportProcPlanner was defined to take a PlanResult and every
report proc planner was returning a PlanResult with the initial state
and the value they way to return. It shouldn't be possible for a report
proc to modify the plan state so just returning a value makes more sense
and results in smaller code.
compiler: Don't reuse symbols for native functions

In our analyser track the symbols of all the defined native functions.
Then when we constructor our initial PlanWriter mark all the native
function symbols as allocated. This prevents a symbol collision if a
Scheme procedure with the same name is created. This is needed for the
next commit to support (cos) etc becoming Scheme functions.
Remove implicit integer -> flonum conversion

Previously exact integer would be implicitly converted to inexact
rationals on demand. This has a few problems:

- Exact integers don't satisfy the inexact rational type - they're
  completely disjoint. The fact that they will convert anyway isn't
  discoverable by the type system.

- Unlike (inexact) no provisions were made for checking overflow

- The code to handle conversions was complex and involved phi'ing cell
  values in the worst case

Switch to making exact integer and inexact rational not freely
convertable. If an attempted conversion between number types in
encountered we suggest the use of (exact) or (inexact).

To soften the performance blow simple static planning for
(exact) and (inexact) has been added.
compiler: Centralise toSchemeTempValue

Now that implicit exact int => inexact rational conversion has been
removed our type system knows precisely which conversions are allowed.
This means that IntermediateValue has enough information to implement
conversions to Scheme values on top of each subclasses toBoxedValue().

The implementation is based off CellValue's old toSchemeTempValue which
was the most general implementation.
compiler: Type name fixes

- Add missing closing bracket to proper list's Scheme name output

- When naming subcast error message constants use the full Scheme name
  instead of just the cell name. Many Scheme types can now share the
  same underlying cell type.
compiler: Proper lists don't satisfy pairs

Proper lists are effectively a union of a special recursive pair type
and the empty list. For that reason it's not possible for them to
definitely satisfy any pair type - they could be the empty list.

Fix by only returning None or Some(false) when checking if a proper
list satisfies a pair. This fixes a crash in an upcoming commit where
the type system was optimising away a check for a proper list being a
pair.
compiler: Support for typed native rest args

This allows native functions to take a uniform list of rest arguments.
This has the primary benefit of supplying more static information to the
compiler. For example, illegal applications such as (+ 1 2 'symbol) are
now caught at compile time.

Currently the runtime will still recheck and recount the argument list.
This is now unnecessary and will be removed shortly.
Add binding::RestArgument and dynamic list hints

- If the Scheme dialect uses immutable pairs make ValuesToProperList
  place list length hints in to newly generated list

- Introduce binding::RestArgument to declare functions taking rest
  arguments. This is just a typed alias for ListElementCell

- Make binding::ProperList skip list validation for RestArguments. It
  will still manually calculate a list length if a list length hint
  isn't present. This can happen if a user constructed list is passed to
  (apply).
Rename (ann) => (cast)

(ann) was originally taken from Typed Racket. There, it statically
ensures the given expression has the specified type. If the type
requirement can't be statically satisfied the compile fails. It has
another syntax, (cast), that will make a runtime contract instead of
failing the compile.

Llambda's implementation of (ann) behaved identically to (cast). The
functionality of (ann) is desirable as it allows a way to opt-in to
compile time type guarantees. It also will make writing unit tests for
type deductions much easier.

To prepare for proper (ann) support rename the existing (ann) to (cast)
to free up the name.
Fix outdated test comment

We removed support for implicit int => flonum conversions. This comment
is now stale because the test has been reversed to test the behaviour we
want.
Introduce (ann)

(ann) allows expressions to be statically annotated with certain types.
If the type can't be satisfied at compile time then the compilation
fails. This allows opt-in static typing.

- Introduce expect-compile-failure and expect-runtime-failure functional
  test types. This allows asserting that a failure happens at a certain
  stage of the test. This isn't strictly required but makes the intent
  of the test more clear

- Introduce the concept of "static checks" in the type system. This is a
  unintrustive changes that suppresses generation of runtime type checks
  and instead throws a compile-time exception

- Introduce (ann). Internally this is handled identically to (cast)
  except it uses the new static check support
compiler: Fix ProperListType static type logic

ProperListType in many ways behaves as a union of the empty list and a
recursive pair type. However, treating it exactly as such causes
infinite recursion in SatisfiesType. For now patch around it by adding
many more proper unit tests and hacking around misbehaviour.

In the future proper recursive types should be supported any
ProperListType should be redefined in terms of that.
compiler: Mark rest arguments as proper lists

Our ABI guarantees that all rest arguments are proper lists. If we have
immutable pairs this means that they must remain proper lists
indefinitely. This means we can internally annotate them as proper list
which triggers additional optimisations with type checking, (length) and
(apply).

This generates signficantly simplified code for (case-lambda) as it can
now calculate list lengths and perform (apply) inline.

This doesn't allow arbitrary list types to be defined in Scheme but is
an intitial step towards that.
compiler: Fix retyper handling of branches

- Types collected from a branch test were only used if the branch test
  aborted. Otherwise retyping would continue down the branches with the
  types collected before the test.

- When attempting to determine if an expression can terminate the
  retyper did not consider the false branch of an (if) due to a copy and
  paste typo.

- Fix a copy-and-paste comment in the unit tests