txt parser: simplify parser and actually make it work
adapt serializer/deserializer to changes in parser
no need to keep track of prevToken anymore; ignore whitespace at the end of value in key/value fields of non-string types