Fixed some test failure and log warnings.

- Make DisplayContent.attachStack and moveStack use the same code
path for adding child stack so they both account for the presence
of pinnded stack.
- Don't call DC.attachStack on a stack that is already on the
display. Use DC.removeStack instead to just make sure it is at the
right z-order on the display.
- Use WindowContainer.getName() when for exception messages to have
a more concise print-out for the error.
- Only try to remove a task from a stack when positioning if the task
is contained in the stack.
- Throw an exception if we try to remove a task that isn't contained
in a stack.
- Skip checking of exiting or waiting for replacement when rebuilding
window list for app tokens that are exiting.
- Properly display and intent output from WC.dumpChildrenNames().
- Have DisplayContent WindowContainer type always return true for
fillsParent() and isVisible() as displays always fill their parent
and always visible for now.

Bug: 31624623
Test: Failing test passes.
Change-Id: I8a84770feb1fd278716755cdec2900fddb9940de
diff --git a/services/core/java/com/android/server/wm/AppWindowToken.java b/services/core/java/com/android/server/wm/AppWindowToken.java
index 1a397ff..ba26e13 100644
--- a/services/core/java/com/android/server/wm/AppWindowToken.java
+++ b/services/core/java/com/android/server/wm/AppWindowToken.java
@@ -1100,12 +1100,16 @@
         }
     }
 
+    int rebuildWindowListUnchecked(DisplayContent dc, int addIndex) {
+        return super.rebuildWindowList(dc, addIndex);
+    }
+
     @Override
     int rebuildWindowList(DisplayContent dc, int addIndex) {
         if (mIsExiting && !waitingForReplacement()) {
             return addIndex;
         }
-        return super.rebuildWindowList(dc, addIndex);
+        return rebuildWindowListUnchecked(dc, addIndex);
     }
 
     @Override
@@ -1187,6 +1191,6 @@
             sb.append(" token="); sb.append(token); sb.append('}');
             stringName = sb.toString();
         }
-        return stringName;
+        return stringName + ((mIsExiting) ? " mIsExiting=" : "");
     }
 }