Safely restart services to avoid race conditions.

At present, service restarts exhibit a race condition whereby the new
(restarting) service process is often spawned before the old (stopping)
process has terminated.  This may result in the new service process failing
to acquire a limited resource (file lock, socket bind, etc.) that the old
process has not yet released.

The new method preforms a safe service restart by stopping the service,
waiting for the old service process to terminate, and (only then) start the
new service process.  In the event of "restarting" an already stopped
service, the previous behavior is maintained whereby the service is simply
started.
Restart oneshot services when manually restarted.

Restores manual restart behavior of oneshot services prior to I9935b519.

Change-Id: Iadfc8462838e3ad2dbbe38d76ba2ef0ce955f722
init: Never allow two same-service processes to exist simultaneously.

A stopping service now remains in SVC_RUNNING state until its exiting
process has been reaped by waitpid.  This prevents a "stop, start" sequence
from spawning a second service process before resources held by the first
are released.  However, a "stop, start" pair _will_ restart the service
after exit (unless critical or oneshot).

This scenario was originally special-cased by the SVC_RESTART state used by
the restart command.  However, we have observed instances where services
are, unintentionally, stopped and started "too quickly," and so
simultaneous processes for the same service should never be allowed.  Note
the SVC_RESTART state (and restart) command is still useful to explicitly
restart critical and oneshot services, for which the "stop, start"
procedure is not intended.
Don't confuse do_exec with other exiting processes.

Change-Id: Ia40e9a12226835e705bb5343baf60abffc45ad4a