Add a method to OatFileAssistantContext to fetch all information.

artd can be multi-threaded, so it needs OatFileAssistantContext to be
thread-safe. This CL adds `OatFileAssistantContext::FetchAll`, which
fetches all information and makes subsequent operations read-only. artd
calls it the first time it initalizes OatFileAssistantContext.

Bug: 229268202
Test: adb shell pm art get-optimization-status \
  com.google.android.youtube
Change-Id: Iacc36655e2cdbc7cb74b3f3cbf7f9ac1a1ffc28e
Merged-In: Iacc36655e2cdbc7cb74b3f3cbf7f9ac1a1ffc28e
(cherry picked from commit 93a13dab243e0141fadacb3137776aff882a1a69)
4 files changed