Markdown input: Fix handling of very large files. Fixes #1212330 [Markdown converter produces garbled output on large files](https://bugs.launchpad.net/calibre/+bug/1212330)