Extract timeouts to compos_common

Centralise the logic for deciding if we need to allow for nested
virtualization. Put the timeouts in one place to remove
duplication. Extend the logic to composd_cmd which was previously
always using the long timeout (which is very annoying for manual
testing).

Bug: 186126194
Test: Presubmits
Change-Id: I7104fc19616e4c745a11c228ada2a0b5be00e8ed
diff --git a/compos/composd_cmd/composd_cmd.rs b/compos/composd_cmd/composd_cmd.rs
index 0b7bd25..baad035 100644
--- a/compos/composd_cmd/composd_cmd.rs
+++ b/compos/composd_cmd/composd_cmd.rs
@@ -25,6 +25,7 @@
 };
 use anyhow::{bail, Context, Result};
 use binder::BinderFeatures;
+use compos_common::timeouts::timeouts;
 use std::sync::{Arc, Condvar, Mutex};
 use std::time::Duration;
 
@@ -115,7 +116,7 @@
 
     println!("Waiting");
 
-    match state.wait(Duration::from_secs(480)) {
+    match state.wait(timeouts()?.odrefresh_max_execution_time) {
         Ok(Outcome::Succeeded) => Ok(()),
         Ok(Outcome::Failed) => bail!("Compilation failed"),
         Err(e) => {