Org reader: Precise rules for the recognition of markup

Inline parsing is rewritten using org source code as a reference.
This fixes a couple of bugs related to erroneous markup recognition.