Fix joins on subqueries

The evaluator was crashing because the context returning from the join had the
wrong table names. Fixed by overriding the type context directly when compiling
the join and using the type context as the source of truth at the evaluation
stage.
Add support for count distinct

This also required making count its own keyword rather than a function and
parsing it specifically into a function.