Add config options for conditionally stopping processes

- "min_uptime":
  if a process is restarted with an uptime smaller than this value,
  this restart counts as an unstable restart. If this option is not specified,
  all restarts are considered unstable.

- "max_restarts":
  if the number of unstable restarts exceeds this number,
  the process will be stopped and a message with number with restarts will be logged.