Refactor type predicate support

Our existing type predicate framework has four main pieces:

1) typegen generates stdlib type predicate functions at typegen time

2) The planner will generate predicates for record types dynamically at
   compile time

3) Some predicates are explicitly handled at reduction time by
   reducer.reportproc

4) Many of the same predicates can be handled at plan time by
   planner.reportproc

This is a very manual and error-prone system that only partially covers
the full set of predicates:

- Introduce (make-predicate) to create arbitrary type predicates. This
  builds upon the generalised type predicate planning introduced
  recently. This and its helper (define-predicate) are the same as the
  versions from Typed Racket.

- Switch the stdlib to define its predicates using (make-predicate)

- Remove type predicate support from typegen

- Have the reducer and planner recognise type predicates in their core
  logic much like report procedures are handled. Remove explicit type
  predicate support from their reportproc packages.

The end result of this is a fairly large code size reduction and more
flexibility in the future for optimisations. For example, propagating
information down to branches when the condition is a type predicate
would be more straightforward now.

This also has the side effect that the type predicates are now available
to LLVM for inlining etc. They're trivial enough that LLVM seems to
always inline them, even inlining them inside their trampoline body when
one is generated.
compiler: Support refining typed arguments

InferArgumentTypes would refuse to refine any arguments that weren't of
type <any>. While this is safe it can miss cases such as refining a
<number> argument to an <integer>. Generalise the logic a bit to handle
arguments of any intrinsic cell type.
compiler: Rename {Infer -> Refine}ArgumentTypes

This better reflects the fact we can find more specific types for
already typed arguments. For example, <number> can be refined in to
<integer> or <list-element> can be refined in to <pair>