refactor the crap out of cursor management

the cursor members are no longer exposed so cursor becomes a real class
and does now most of the management of text blocks directly.

Code readability improved. Not seen any regressions yet of this
refactoring.
allow to insert and delete

now the user can insert and delete at the cursor position

support is partial for both cases, in particular delete is broken at the
start of the textblock and neither handle splitting into more blocks.