rpc: add a bencode serialization format