Support external display rendering in vr flinger

Add support for external displays to vr flinger, hidden behind a system
property until we're ready to use it. To turn it on for testing:

$ adb shell setprop persist.vr.use_external_display 1

With external display support turned on and an external display
connected, all output is redirected to the external display, and we
switch to the external display's vsync.

Bug: 75047963

Test: Most of the testing was done on a Polaris, which now supports
external display hotplugging.

- Tested external display connect/disconnect while the device was
  donned.

- Tested external display connect/disconnect while doffed.

- Verified booting with the external display connected doesn't cause the
  device to crash, although we don't seem to get a hotplug event for the
  external display until the cable is disconnected and reconnected, so
  we output to the primary display at first.

- Did some basic testing on a Walleye to confirm vr behavior there is
  unchanged.

- Verified the external display is ignored when the sysprop is unset.

Change-Id: I3d3f40e276d354551fc1c577b9392709398ad96e
diff --git a/libs/vr/libvrflinger/Android.bp b/libs/vr/libvrflinger/Android.bp
index 3e4a42c..4dc669b 100644
--- a/libs/vr/libvrflinger/Android.bp
+++ b/libs/vr/libvrflinger/Android.bp
@@ -72,6 +72,7 @@
     srcs: sourceFiles,
     export_include_dirs: includeFiles,
 
+    clang: true,
     cflags: [
         "-DLOG_TAG=\"vr_flinger\"",
         "-DTRACE=0",
@@ -83,6 +84,9 @@
         "-Wno-error=sign-compare", // to fix later
         "-Wno-unused-variable",
     ],
+    cppflags: [
+        "-std=c++1z"
+    ],
     shared_libs: sharedLibraries,
     whole_static_libs: staticLibraries,
     header_libs: headerLibraries,