Be more prescise in the profile analysis

Distinguish between:
 - compile
 - don't compile because we don't have enough delta (standard case)
 - don't compile because all profiles are empty

This will help us be more precise in the compilation strategy and
avoid re-compiling verified dex files when the profile is empty.

Also, this CL fixes dexoptanalyzer tests.
We needed to generate odex files instead of oat files in the
dalvik-cache when testing the functionality. That's because during
tests, the parent directory of the apk is always writable and
OatFileAssistant will believe that it needs to select the odex
files despite having an oat file.

The fix caught issues in the downgrade test, which were also
addressed.

Test: gtest
Bug: 188655918
Change-Id: Id8370541f73465b32dc91aeacf2ba4dc2656c290
diff --git a/profman/profile_assistant.cc b/profman/profile_assistant.cc
index 614a736..d098738 100644
--- a/profman/profile_assistant.cc
+++ b/profman/profile_assistant.cc
@@ -78,6 +78,9 @@
 
   // If we perform a forced merge do not analyze the difference between profiles.
   if (!options.IsForceMerge()) {
+    if (info.IsEmpty()) {
+      return kSkipCompilationEmptyProfiles;
+    }
     uint32_t min_change_in_methods_for_compilation = std::max(
         (options.GetMinNewMethodsPercentChangeForCompilation() * number_of_methods) / 100,
         kMinNewMethodsForCompilation);
@@ -88,7 +91,7 @@
     if (((info.GetNumberOfMethods() - number_of_methods) < min_change_in_methods_for_compilation) &&
         ((info.GetNumberOfResolvedClasses() - number_of_classes)
             < min_change_in_classes_for_compilation)) {
-      return kSkipCompilation;
+      return kSkipCompilationSmallDelta;
     }
   }