Sliding window as an iterator (perhaps reusable in other scripts in khmer?). Seems to work now, needs more validation though