Avoid lots of allocation/boxing with cursors.

Only changed on Moar here, but can do similar thing on other backends.
Improve regex prelude when we can know cursor type

Means we can emit some more things as hinted lookups.
A few more Cursor access code-gen improvements.