SF: Simplify per-display refresh rate selection

Remove verbose, single-use helper functions/types to centralize the
selection logic and merge two passes. Avoid allocation and hashing.

Fix the algorithm to not choose a refresh rate based on total score
unless it is common to all displays, and not be thrown off by equal
scores.

Bug: 241285191
Test: libsurfaceflinger_unittest
Change-Id: I355dea767c6b564a04a51476f0cc235a1fceb879
diff --git a/services/surfaceflinger/Display/DisplayMap.h b/services/surfaceflinger/Display/DisplayMap.h
index baf0da9..0d59706 100644
--- a/services/surfaceflinger/Display/DisplayMap.h
+++ b/services/surfaceflinger/Display/DisplayMap.h
@@ -17,6 +17,7 @@
 #pragma once
 
 #include <ftl/small_map.h>
+#include <ftl/small_vector.h>
 
 namespace android::display {
 
@@ -28,4 +29,7 @@
 template <typename Key, typename Value>
 using PhysicalDisplayMap = ftl::SmallMap<Key, Value, 3>;
 
+template <typename T>
+using PhysicalDisplayVector = ftl::SmallVector<T, 3>;
+
 } // namespace android::display