adb: rationalize types.

Use fixed length types for structs going over the wire, constify
arguments where possible, use char* instead of unsigned char* for
apacket data, and assorted other refactoring.

Bug: http://b/29273531
Test: python test_device.py with every combination of old/new adb and adbd
Change-Id: I0b6f818a32be5386985aa4519f542003cf427f9d
diff --git a/adb/transport.h b/adb/transport.h
index aaa8be4..621516c 100644
--- a/adb/transport.h
+++ b/adb/transport.h
@@ -112,7 +112,7 @@
     std::shared_ptr<RSA> NextKey();
 #endif
 
-    unsigned char token[TOKEN_SIZE] = {};
+    char token[TOKEN_SIZE] = {};
     size_t failed_auth_attempts = 0;
 
     const std::string connection_state_name() const;