PEP8 and (mostly) PyLint clean bencode; simplify encoding and testing