Upgrade to current NetBSD popen/pclose.

This gets us back to using vfork now our ARM vfork assembler stub is
fixed, and adds the missing thread safety for the 'pidlist'.

Bug: 5335385
Change-Id: Ib08bfa65b2cb9fa695717aae629ea14816bf988d
diff --git a/tests/stdio_test.cpp b/tests/stdio_test.cpp
index 196c725..7569d04 100644
--- a/tests/stdio_test.cpp
+++ b/tests/stdio_test.cpp
@@ -185,3 +185,15 @@
   snprintf(buf, sizeof(buf), "%zd", v);
 #endif
 }
+
+TEST(stdio, popen) {
+  FILE* fp = popen("cat /proc/version", "r");
+  ASSERT_TRUE(fp != NULL);
+
+  char buf[16];
+  char* s = fgets(buf, sizeof(buf), fp);
+  buf[13] = '\0';
+  ASSERT_STREQ("Linux version", s);
+
+  ASSERT_EQ(0, pclose(fp));
+}