Define a composite syntax-propertize-function

This gives us proper recognition of regexps in Ruby and JS submodes, and also percent literals and string interpolations in Ruby ones.

Even with new performance tweaks, the fontification is slower by 20% or so, but otherwise it seems to work fine.