stop.sh: wait intelligently after kill instead of sleeping 5 seconds

This will make the 5 second delay only occur if sigterm fails.

Technically `sleep 0.1` is not a posix standard but to my knowledge every modern system supports it. I threw in `usleep` for good measure although it's not as ubiquitous as non-integer `sleep` in my experience.

This still isn't really handled correctly, but that will eventually be resolved by a proper pidfile.