WFCORE-194 Improve Debian/Ubuntu init.d shutdown process

The init.d script for Debian/Ubuntu can be improved in the way it shutdown the server...

If some process hang up, the actual script don't handle that scenario.

Perhaps add a "sleep 0.1" if $status_stopped -ne 3?  Otherwise this can go into a pretty tight loop, which would be particularly bad if there were some problem preventing shutdown, resulting in the loop executing continually.

AIUI sleep 0.1 should work on debian. Using sleep 1 is safer but slower. Safer as using decimals is not supported on all OSs:

http://serverfault.com/questions/469247/how-do-i-sleep-for-a-millisecond-in-bash-or-ksh