kill_server.sh: Avoid non-standard --timeout option for kill command
On some systems, kill does not support the --timeout option, making this script not portable. We replace the --timeout usage with a more portable implementation of the same behaviour in bash.
Closes #1127 (closed).