adb: extend sync protocol's stat support.

Extend the file sync protocol to support calling regular stat (instead
of lstat), return error codes, and provide the entire stat struct.

Bug: http://b/33058958
Test: python test_device.py with both old and new adbd
Change-Id: I841123debc380f86194a19e91c97d85160112144
diff --git a/adb/transport.cpp b/adb/transport.cpp
index 132702d..7b82b19 100644
--- a/adb/transport.cpp
+++ b/adb/transport.cpp
@@ -49,6 +49,7 @@
 
 const char* const kFeatureShell2 = "shell_v2";
 const char* const kFeatureCmd = "cmd";
+const char* const kFeatureStat2 = "stat_v2";
 
 static std::string dump_packet(const char* name, const char* func, apacket* p) {
     unsigned  command = p->msg.command;
@@ -771,7 +772,8 @@
     // Local static allocation to avoid global non-POD variables.
     static const FeatureSet* features = new FeatureSet{
         kFeatureShell2,
-        kFeatureCmd
+        kFeatureCmd,
+        kFeatureStat2,
         // Increment ADB_SERVER_VERSION whenever the feature list changes to
         // make sure that the adb client and server features stay in sync
         // (http://b/24370690).