Split AddLocalVarLoadStoreInstructions into two passes

* This is cleanup as indicated in commit 06304620b

* Tweaking this pass, and how/when it is run will come in
  later patches that will clean this up.

* The split exposed a bug in the dyn-scope optimization.
  With the split, more scopes had both AddLocalVarLoadStoreInstructions
  and OptimizeDynScopes run on them and crashed some specs.
  This fix ensures that the two passes can run in either order
  without corrupting the scope.

* Discovered that we need to preserve dyn-scope for scopes
  that contain 'Kernel.local_variables'. Did the conservative
  thing in CallBase.java.
Clean up compiler pass run logic a bit.

* Keep track of what passes have run in IRScope.

* Updated CompilerPass.run to:
  - Update this list of passes,
  - Check if the pass has been previously run.
    Added a force parameter (for a future scenario) for when
    we need to re-run a pass.
  - Provide default implementations of previouslyRun and
    invalidate.

* Individual passes override the default implementations where
  necessary (for example, where invalidation is not possible
  because the pass is not reversible).