Resolved a bit of code duplication
Rewrote optimization approach

Instead of manual recursion, have all optimizations be non-recursive and
rather use high-level functions like map and filter to implement the
optimizations.

Applying an optimization to a complete program recursively is factored
into a separate 'foldProgram' function.
Don't print compiled program before executing it

It was useful for debugging, but I never meant to commit it. Maybe I
should add a commandline switch for this.
Use an unboxed vector to represent machine memory

Since we're dealing with plain Int values, an unboxed vector makes for
much more efficient space usage. It also saves ~15% runtime for the
mandelbrot example.