py3: convert indexes into bytes when enumerating lists in urlencodenested

Authored by Kwan.

Description

py3: convert indexes into bytes when enumerating lists in urlencodenested

Otherwise it'll try to insert them them into a %s slot in a b'' later and fail.

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