[IR] Clear IR state correctly after running some passes.

* LVA information is invalid after most passes that modifies the
  instruction list of a scope.
* This fix eliminates crashers when passes are run in
  non-default orders.