Visit interfaces in topological order

Closure formatted output with JsDoc dependings on @constructor
declarations being able to @implements a related interface. The closure
compiler enforces that a use cannot occur before a def, so this small
change ensures that the interfaces of a class are visited and generated
before the class itself is.

Change-Id: Ib7fc208bb3d8c0f4356c457c0ab9ff0b570deff8
diff --git a/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java b/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
index 94a2e99..4cd3402 100644
--- a/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
+++ b/dev/core/src/com/google/gwt/dev/jjs/impl/GenerateJavaScriptAST.java
@@ -1168,6 +1168,13 @@
         return;
       }
       insertInTopologicalOrder(type.getSuperClass(), topologicallySortedSet);
+
+      for (JInterfaceType intf : type.getImplements()) {
+        if (program.typeOracle.isInstantiatedType(type)) {
+          insertInTopologicalOrder(intf, topologicallySortedSet);
+        }
+      }
+
       topologicallySortedSet.add(type);
     }