[PDI-12347] - SQL parsing was always starting from beginning of string, added unit tests, made it discard already processed segments, upped timeout in MetricsPainterTest