More efficient implementation of Util.isDistinct for small lists.

Add a benchmark to prove it, and tweak the Benchmark utility class.
Graph algorithms: Implement breadth-first iterator and cycle-detector.
Fix several bugs in constant-reduction. Also some bugs in code-generation.
Oops! (Mock planner needs an Executor.)