SF: Sequential display mode IDs

If the supported display modes differ after a hotplug
assing the new modes new IDs. This way the old IDs will
self invalidate.

This breaks the assumption that the modes IDs are
equivalent to indices in the array of supported modes.

Bug: 159590486
Test: manually 0. device boots in 60hz mode
               1. switch to 50hz from app
               2. disconnect display
               3. reconnect display
      dumpsys SurfaceFlinger after each step to
      verify mode IDs change as expected
Change-Id: I44c90e8151f31e998b43649dad73c51d6948195d
diff --git a/services/surfaceflinger/SurfaceFlinger.h b/services/surfaceflinger/SurfaceFlinger.h
index 1615ab6..d1eae1c 100644
--- a/services/surfaceflinger/SurfaceFlinger.h
+++ b/services/surfaceflinger/SurfaceFlinger.h
@@ -906,7 +906,7 @@
     /*
      * Display management
      */
-    DisplayModes loadSupportedDisplayModes(PhysicalDisplayId) const;
+    DisplayModes loadSupportedDisplayModes(PhysicalDisplayId) const REQUIRES(mStateLock);
     sp<DisplayDevice> setupNewDisplayDeviceInternal(
             const wp<IBinder>& displayToken,
             std::shared_ptr<compositionengine::Display> compositionDisplay,