IE, Chrome, Firefox plugins: gracefully disconnect when server connection drops.

1) Plugins fails gracefully in the face of a disconnect, returning undefined instead of making lots of noise.

2) Plugins invokes hosted.html's __gwt_disconnected() method the first time the session is detected as dropped.  This glasspanels the app.

Review by: jat

git-svn-id: https://google-web-toolkit.googlecode.com/svn/trunk@7129 8db76d5a-ed1c-0410-87a9-c151d255dfc7
diff --git a/plugins/npapi/ScriptableInstance.h b/plugins/npapi/ScriptableInstance.h
index cdce6f3..2d03a67 100644
--- a/plugins/npapi/ScriptableInstance.h
+++ b/plugins/npapi/ScriptableInstance.h
@@ -72,6 +72,10 @@
   void destroyJavaWrapper(JavaObject*);
 
   static const uint32_t VERSION = 1;
+
+protected:
+  virtual void disconnectDetectedImpl();
+
 private:  
   // Map of object ID to JavaObject
   hash_map<int, JavaObject*> javaObjects;
@@ -94,6 +98,7 @@
   const NPIdentifier statsID;
   const NPIdentifier gwtId;
 
+  const NPIdentifier jsDisconnectedID;
   const NPIdentifier jsInvokeID;
   const NPIdentifier jsResultID;
   const NPIdentifier jsTearOffID;