Extracted some logic to utils_default.cpp in order to make platform specific overriding easier

Test: manual - could install and remove an app. As this is
refactoring there is no need for automated tests.

Change-Id: Ia9321de6699c69fbb7cfa9cf43edde102d56d532
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index 51f30da..cbf0e09 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -2377,7 +2377,7 @@
     if (validate_apk_path(packageDir.c_str())) {
         return error("Invalid path " + packageDir);
     }
-    if (delete_dir_contents_and_dir(packageDir) != 0) {
+    if (rm_package_dir(packageDir) != 0) {
         return error("Failed to delete " + packageDir);
     }
     return ok();