Fix cursorcontext regression.

The fix is to correctly calculate the offset within the token under the
cursor, rather than assume that the cursor is always at the end of one.

Fixes #236.