RegExp rework - part 04

This is a fourth part of PR #3223. (Other part are PRs #3433, #3434, #3435)
This part introduce support for studying and JIT-compiling regular expressions.