Mostly complete JavaScript regex support

This pull request gets most of the ECMA 262 regular expression tests passing in DynJS, which uses Joni as its underlying regexp engine.

The request mostly consists of adding new syntax options, but there were a couple of places where existing functionality was slightly changed to fix what appeared to be bugs in the existing implementations.

All the Joni tests pass but it would be good to find out the major users of Joni (just JRuby and DynJS?) and ensure their regexp tests pass with this PR as well.