markdown: decorator generate headline ids and save them for further use in client.

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>
markdown: fix out of bound access on MDLine

Signed-off-by: Alexandre Terrasa <alexandre@moz-code.org>