WKT lexer

As I found myself some spare time and enthusiasm, I tried to write a lexer to replace the regex-based parsing of WKT strings (see also #2172). Here is the result. Please let me know whether this is anywhere near the concepts that have been conceived.
Yes, the other geometries have the same issue. Fortunately the parser always returns an array in these cases. If you ask me, I think `flatCoordinates` should **always** be an non-null array. But I'm not sure whether this breaks anything else.