Close inline controls / hide the gear when interaction outside occurs

This CL adds the behavior so that if the gear or inline controls are
visible, they will close if the user interacts with another area of
the screen (e.g. scrolls, pulls down QS, etc) this is on the lock screen
as well as the shade.

This CL makes an additional change to remove the GearDisplayedListener
and use the StackScroller to maintain state of the gear / reset as
appropriate.

Bug: 27598072
Bug: 27335311

Change-Id: Iebff9aa542c9d91389054a4ff292d0dda11fe950
diff --git a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
index 6a2ecf4e..ebfa018 100644
--- a/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
+++ b/packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBarWindowView.java
@@ -226,6 +226,10 @@
                 return false;
             }
         }
+        if (ev.getActionMasked() == MotionEvent.ACTION_DOWN) {
+            mStackScrollLayout.closeControlsIfOutsideTouch(ev);
+        }
+
         return super.dispatchTouchEvent(ev);
     }