search: error on breaking concat invariant
Created by: rvantonder
Stacked on #12446.
The test cases in this PR previously made the parser crash, found by fuzzing. The reason these crash is because these inputs succeed at breaking an assertion where we want to concat contiguous patterns that contain parentheses (versus parentheses that we try our best to guess are part of a group).
The only way to trigger this is if the pattern(s) are in some way unbalanced, or use unconventional unicode space characters. Thus, these are fringe and unusual inputs that would need some more heavy changes to support (which I am open to doing, but not in this PR). So for now, I add the crashing inputs as tests, demoted the strong panic
to instead just return error and give up, saying this is invalid syntax, and log the offending inputs.
Modulo #12456, the parser doesn't crash anymore with more fuzzing, which is the state I need this code to be in to do more refactors.