This PR updates test/binary/interactive_shell_parser_inc.py so that the sendline function does not match and ignore previous output. The revised Python script also prints the found output when an assertion fails.
The commit 68fc815 changed the behavior of the interactive shell to use setStringInput instead of setIncrementalStringInput / appendIncrementalStringInput. This change introduces a new private method to replicate the old behavior, where we do not reallocate a parser each line, which leads to issues (which happened to be found in #10258).
It furthermore corrects an issue in incremental when using the parser API, where multiple "outermost contexts" could be pushed on a symbol manager, which leads to synchronization issues concerning scope levels in symbol manager.
Also adds a test for the interactive shell that would have caught this.