[markdown mode] Fix for token sometimes not advancing the stream

Issue #2447
Add check for stream advancement to mode test runner

Issue #2447
[haml mode] Fix tokenizer not advancing stream when switching modes