Add misc android/base/ helper classes.

This patch adds a few new helper classes under android/base/ that
will be used by future patches.

- Add a 'clear' method to String class.

- Add StringFormat() function to generated String instances
  from formatted string input, and StringAppendFormat() to
  append some to an existing instance.

- Add ScopedFd to implement a scoped file descriptor wrapper.

- Add ScopedHandle to implement a scoped Win32 HANDLE wrapper.

Change-Id: I0ae2a1de1123586b23e4faca8f394c6b4dff622e
diff --git a/Makefile.tests b/Makefile.tests
index 2c4b28c..68933b6 100644
--- a/Makefile.tests
+++ b/Makefile.tests
@@ -11,14 +11,22 @@
   android/base/containers/StringVector_unittest.cpp \
   android/base/EintrWrapper_unittest.cpp \
   android/base/files/PathUtils_unittest.cpp \
+  android/base/files/ScopedFd_unittest.cpp \
   android/base/files/ScopedStdioFile_unittest.cpp \
   android/base/Log_unittest.cpp \
   android/base/memory/MallocUsableSize_unittest.cpp \
   android/base/memory/ScopedPtr_unittest.cpp \
   android/base/String_unittest.cpp \
+  android/base/StringFormat_unittest.cpp \
   android/base/StringView_unittest.cpp \
   android/filesystems/ext4_utils_unittest.cpp \
 
+ifeq (windows,$(HOST_OS))
+EMULATOR_UNITTESTS_SOURCES += \
+  android/base/files/ScopedHandle_unittest.cpp \
+
+endif
+
 $(call start-emulator-program, emulator_unittests)
 LOCAL_C_INCLUDES += $(EMULATOR_GTEST_INCLUDES)
 LOCAL_LDLIBS += $(EMULATOR_GTEST_LDLIBS)