Add support for autorestart in aos_starter

We have applications which we want to run only once (at startup or
during runtime).  This enables the user to configure the state machine
to support the behavior they want.

Change-Id: Ica59338956eb1cadd2edac49fbdac51b56aa516a
Signed-off-by: James Kuszmaul <james.kuszmaul@bluerivertech.com>
diff --git a/aos/starter/starterd_lib.h b/aos/starter/starterd_lib.h
index 8c70960..e1f82a0 100644
--- a/aos/starter/starterd_lib.h
+++ b/aos/starter/starterd_lib.h
@@ -97,6 +97,8 @@
 
   bool autostart() const { return autostart_; }
 
+  bool autorestart() const { return autorestart_; }
+
  private:
   void DoStart();
 
@@ -130,6 +132,7 @@
   bool queue_restart_ = false;
   bool terminating_ = false;
   bool autostart_ = true;
+  bool autorestart_ = true;
 
   aos::starter::State status_ = aos::starter::State::STOPPED;
   aos::starter::LastStopReason stop_reason_ =