SERVER-9253 `rpm/init.d-mongod stop` unnecessarily sleeps for 5mn

`/etc/init.d/mongod stop` uses killproc with a 5mn delay between TERM and KILL.
In most cases this 5mn sleep is too long and the stop command hangs unnecessarily even though the process has exited successfully.

This ticket is to re-implement the same 5mn delay but with a busy-wait loop that would return as early as possible.

https://jira.mongodb.org/browse/SERVER-9253
declare all local variables in functions with 'local'