[IR] Update the set of instructions that can throw exceptions.

* define_class/method/module can throw exceptions.

* put_const/cvar/field can throw exceptions if the object/module
  is frozen and unmodifiable.

* Some other minor reorg.