TESTS: added parse/case tests.
FIX: parse/trace mode could sometimes crash on 'pop event (thanks to Adrian for reporting it).
FEAT: now rules logging on screen are cut too if too long in 'on-parse-event callback.