Switch over to the google3 unix_file File*.

I also moved macros.h to base/macros.h to ease google3 porting, at
the expense of a larger than necessary change. (I learned my lesson,
though, and didn't make the equivalent base/logging.h change.)

I'm not sure whether we want to keep the unix_file MappedFile given
our existing MemMap, but it's easier to bring it over and then remove
it (and possibly revert the removal) than to bring it over later.

Change-Id: Id50a66faa5ab17b9bc936cc9043dbc26f791f0ca
diff --git a/src/signal_catcher.cc b/src/signal_catcher.cc
index db0d2c7..9fdf4e9 100644
--- a/src/signal_catcher.cc
+++ b/src/signal_catcher.cc
@@ -25,8 +25,8 @@
 #include <sys/types.h>
 #include <unistd.h>
 
+#include "base/unix_file/fd_file.h"
 #include "class_linker.h"
-#include "file.h"
 #include "heap.h"
 #include "os.h"
 #include "runtime.h"
@@ -106,13 +106,12 @@
     PLOG(ERROR) << "Unable to open stack trace file '" << stack_trace_file_ << "'";
     return;
   }
-  UniquePtr<File> file(OS::FileFromFd(stack_trace_file_.c_str(), fd));
+  UniquePtr<File> file(new File(fd, stack_trace_file_));
   if (!file->WriteFully(s.data(), s.size())) {
     PLOG(ERROR) << "Failed to write stack traces to '" << stack_trace_file_ << "'";
   } else {
     LOG(INFO) << "Wrote stack traces to '" << stack_trace_file_ << "'";
   }
-  close(fd);
 }
 
 void SignalCatcher::HandleSigQuit() {