Fix aarch64-linux memory corruption
This is an attempt to fix the memory corruption seen on aarch64-linux (in issue 144). On aarch64-linux, tree-sitter test would crash, while tree-sitter test --debug-build would pass (except for one test, varsym: error: carrow:, which would fail no matter what, but with a failure seemingly unrelated to the memory corruption). With this change, tree-sitter test passes all tests but varsym: error: carrow: and does not exhibit any crashes.
Claude helped me track down that the discrepancy between --debug-build and not is that --debug-build uses lower optimization flags- -O0 and -O1 are fine, but -O2 causes the crash. Claude then identified the change to scanner.c as a potential fix (the remainder of the diff is generated by tree-sitter generate --build). I can't say I fully understand it, but seemingly at higher optimization levels, PEEK might be incremented simultaneously with array_push leading to out-of-bounds memory access?