[IR] Implement Match2Capture in IR mode.

* Introduced SetCapturedVarInstr to set the value of captured
  vars in regular expressions. This uses $~ implicitly like all
  other regex-related instructions and operands. At a later point,
  this could be made explicit.

* Also added some missing explanatory comments in computeScopeFlags
  for Match*Instr (related to implicit use of $~).

* 14 more MRI tests now passing.