cli: restore old displayhook
htmlutils: add parse_html_with_encoding
cli: avoid reread history
cli: support libedit