adb: add helper to get the ~/.android directory.

Extract the logic for creating ~/.android out of get_user_key_path into
its own function. Also, fall back to getpwuid_r when $HOME isn't
defined.

Change-Id: I676a7c750cb364f89b544818ffda07903d14fb97
Test: ran adb with ~/.android missing
diff --git a/adb_utils.h b/adb_utils.h
index f6b4b26..d08c411 100644
--- a/adb_utils.h
+++ b/adb_utils.h
@@ -33,10 +33,10 @@
 std::string adb_dirname(const std::string& path);
 
 // Return the user's home directory.
-// |check_env_first| - if true, on Windows check the ANDROID_SDK_HOME
-// environment variable before trying the WinAPI call (useful when looking for
-// the .android directory)
-std::string adb_get_homedir_path(bool check_env_first);
+std::string adb_get_homedir_path();
+
+// Return the adb user directory.
+std::string adb_get_android_dir_path();
 
 bool mkdirs(const std::string& path);