Reimplement -nextPositionFrom:matchingColumn:returnNotFound: to be O(n)

It used to be O(n^2)

Also improve some other functions now that this one is fast.
Merge commit '4473e' into develop

* commit '4473e':
  Reimplement -nextPositionFrom:matchingColumn:returnNotFound: to be O(n)