py3: use pycompat.iterbytestr to convert memoryview slice to bytestring

Authored by Kwan.

Description

py3: use pycompat.iterbytestr to convert memoryview slice to bytestring

Otherwise ch is the int value of the byte in py3 rather than the actual
character.

Differential Revision: https://phab.mercurial-scm.org/D6103