Sanitize C0 character in OSC, and fix BROKEN_OSC/BROKEN_ST behavior
Add a test script for OSC sequence
Add ADVANCE macro to encapsulate some iterative operations
Fix conditions for recognizing recursive OSC and ST