FIX: % is not quoted iff there are an even number of \ before it
(Previously, decide % to be non-escaped if the previous char is not backslash which is incorrect as in `\\%`.)

In `CharIndexer`:
FIX: a number of data dependency bugs in `replace` due to assumption on old value of first_segment_end
FIX: wrong for-loop in third case of first step i.e. delete [start..end)
FIX: wrong return; must NOT return segment_segment_start in case r == first_segment_end because this method is supposed to return `logical occurrences`, not actual storage position in markers
Remove unnecessary methods `store` and `next`