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.
I agree, and the same holds for the parser. But somehow it feels more comfortable to use protected classes. I guess it looks better :-)