Offsets: Switch to Lua offset calculation functions

A first step toward efficient offset caching for gap
buffers.
Cursor: Switch off jit for callback-inducing invocation