Fixes to JIT of regexp named-group captured vars.

* Store result to complete SetCapturedVar.
* Get name using depth and offset during IR build of captured var.

Fixes #1993.