Introduce a new ParserInput to match how less.js handles less input string. This work will provide a better parity with upstream and reduce the Parser class complexity.
The previous attempt done as a part of T353131 - https://gerrit.wikimedia.org/r/q/Ib9e1c618910986505f8cf00c328c26bc1bb183e3 caused a performance regression.
To test performance, php test/bench.php can be used.