Add a singleton CacheLocation to replace the hard coded locations

This class allows us to set the following locations dynamically:
cache_temp_source, last_command_file, stash_directory_base.

In the updater's main function, we reset the values of these variables
to their default locations in /cache; while we can set them to temp
files in unit tests or host simulation.

Test: unit tests pass
Change-Id: I528652650caa41373617ab055d41b1f1a4ec0f87
diff --git a/otautil/Android.bp b/otautil/Android.bp
index 5efb12d..75cf691 100644
--- a/otautil/Android.bp
+++ b/otautil/Android.bp
@@ -21,6 +21,7 @@
         "SysUtil.cpp",
         "DirUtil.cpp",
         "ThermalUtil.cpp",
+        "cache_location.cpp",
         "rangeset.cpp",
     ],