[Hexagon] Fix infinite loop during packet error recovery (#248447)
Stop eatToEndOfPacket() at end of file instead of repeatedly looking for
a closing brace. Only consume the closing brace and clear InBrackets
when one is found.
Add regression tests for an unavailable instruction inside a macro
expansion and an incomplete packet.
Fixes #248446
Signed-off-by: Rishabh Bali <rbali@qti.qualcomm.com>
Co-authored-by: Alexey Karyakin <akaryaki@qti.qualcomm.com>