Based on the triangular matrix approach as explained here:
https://towardsdatascience.com/fast-word-segmentation-for-noisy-text-2c2c41f9e8da
Use iteration rather than recursion to segment the input forwards
rather than backwards and use a `Vec`-based memoization strategy
instead of relying on a `HashMap` of words. This version is about
4.8x faster, 100 lines of code less and should use much less memory.