shill: increase kill timeout to 10s

This CL increases the kill timeout for the shill job to 10s and makes it
stop on 'starting pre-shutdown' in order to ensure that shill has enough
time to complete its termination clearly. It also adds the bootstat
'shill-start' and 'shill-stop' for tracking the startup and shutdown
time of shill.

BUG=chromium:303395
TEST=Tested the following:
1. Connect to WiFi and cellular, and then run `stop shill` to terminate
   shill. Verify that shill terminates properly.
2. Connect to WiFi and cellular, and then run `restart shill` to restart
   shill. Verify that shill terminates and restarts properly.
3. Modify shill to artificially make it take more than 10s to terminate.
   - Run `stop shill` and verify that upstart kills shill after the 10s
     wait times out.
   - Run `init 6` and verify that chromeos_shutdown is not started
     before shill is terminated, i.e. bootstat_summary shows that
     'shill-stop' happens before 'shutdown-start'.

(cherry picked from commit 8d48f5b17a0eb7adcf5abd43d6e026a2ab9b7d32)

Change-Id: I02a19e5051e192c5926107bdff137b3f5629c628
Reviewed-on: https://chromium-review.googlesource.com/172722
Reviewed-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
1 file changed