Update proxy resolver and tests for V8 API changes. DO NOT MERGE.

Embedders now need to provide a v8::Platform implementation.
dnsResolve() now returns 'undefined' instead of 'null' to indicate
an error.

FPIIM-449

Bug: 31987131
Bug: 29178923

Change-Id: I7f1d01320b1cb8bbd1ac44f6e062062fe55929c8
(cherry picked from commit 8515d3f2a8f515601544dd9e1eac0dd48b726722)
diff --git a/src/proxy_resolver_v8.cc b/src/proxy_resolver_v8.cc
index 7e52dc6..533ef88 100644
--- a/src/proxy_resolver_v8.cc
+++ b/src/proxy_resolver_v8.cc
@@ -10,6 +10,7 @@
 #include <string>
 #include <utils/String8.h>
 #include <v8.h>
+#include <libplatform/libplatform.h>
 #include <vector>
 
 #include "net_util.h"
@@ -705,7 +706,11 @@
     ProxyErrorListener* error_listener)
     : context_(NULL), js_bindings_(custom_js_bindings),
       error_listener_(error_listener) {
-  v8::V8::Initialize();
+  if (v8::V8::GetCurrentPlatform() == NULL) {
+    v8::Platform* platform = v8::platform::CreateDefaultPlatform();
+    v8::V8::InitializePlatform(platform);
+    v8::V8::Initialize();
+  }
 }
 
 ProxyResolverV8::~ProxyResolverV8() {