Bring in var tracking code from NQP's optimizer.

Will need various tweaks and extensions for use with full-blown Perl
6, but it'll provide a known-good starting point.
Break optimizer up into a few classes.

Having it as a single 1,200-line class was already getting hard to
manage, so before adding more to it start breaking a few things out.
This breaks symbol handling and junction optimization out into two
separate classes.