fix one-off problem in text splitting algorithm

A one-off problem (findPositionBefore was actually findPositionAfter)
lead together with a wrong range check (< instead of <=) to unstable
layout while typing. 

All layout-dependent tests had to be adapted.

Signed-off-by: Florian Thienel <florian@thienel.org>
6 files changed