in most cases, keys are us-ascii, but BEP-52 allows some
keys to be binary data.. It does appear that it only applies to
dictionaries that are under 'piece layer', so pass down the parent
key, and don't do encoding for the dictionary that is under it.
It also had a bug where if a dictionary key had code points >127,
it'd encode the values incorrectly, because it'd take the length of
the string and not the encoded string..