ART: Fix android-cloexec warnings

Use the DupCloexec helper wherever possible. Add O_CLOEXEC to open
and fopen calls.

Bug: 32619234
Test: WITH_TIDY=1 mmma art
Change-Id: I0afb1beea53ab8f68ab85d1762aff999903060fe
diff --git a/runtime/monitor_android.cc b/runtime/monitor_android.cc
index 74623da..19e1f3d 100644
--- a/runtime/monitor_android.cc
+++ b/runtime/monitor_android.cc
@@ -43,7 +43,7 @@
 
   // Emit the process name, <= 37 bytes.
   {
-    int fd = open("/proc/self/cmdline", O_RDONLY);
+    int fd = open("/proc/self/cmdline", O_RDONLY  | O_CLOEXEC);
     char procName[33];
     memset(procName, 0, sizeof(procName));
     read(fd, procName, sizeof(procName) - 1);