compiler: Introduce typecheck.CheckResult

- Move PlanTypeCheck in to the new planner.typecheck package. This only
  has two main classes at the moment but it should be growing in the
  near future

- Introduce typecheck.CheckResult. This is similar in to an
  IntermediateValue in that it's a lazy value that will only convert to
  the desired type just-in-time. Unlike IntermediateValue it has a very
  restricted interface that does not require the world pointer. This
  means it can be used in world pointerless situations like type
  predicates

- Make PlanTypeCheck return a CheckResult instead of a TempValue
  predicate. At the moment the only functional change is this avoids
  planning some useless predicate values when the check result is
  statically known. However, this will become more important when
  recursive types such as lists are supported and PlanTypeCheck will
  need to tail recursively call itself and pass a CBool back