Fix misbehaving caret movement with multiple cursors.

With multiple regions, we need to modify them front-to-back as otherwise
modifications in preceding regions will affect cursor postiion when modifying
following ones. The regions seem to be always sorted by the position in the
document so we shouldn't need more sophisticated logic.

Also disable some debugging print's.