py3: use hex(hasher.digest())
.hexdigest() returns a system str. .digest() consistently returns
bytes.
Differential Revision: https://phab.mercurial-scm.org/D2159
py3: use string for "close" value in commit extras
The extras dict on commits has string keys and values. Before this
commit, we passed "close" as an integer, which Python 2 gladly
coerced to a string during a %s formatting in the bowels of
changelog.py.
Differential Revision: https://phab.mercurial-scm.org/D2157