Replace peekChar by peekChar'

If we don't expect end-of-input, we can use peekChar' instead, which
will simply fail at EOI, instead of using the more costly peekChar.
Use lookahead to reduce backtracking in iri and classExpression