Break from get_job loop if we're stopping

Assuming the TERM signal handler works, the get_job loop still continues
polling indefinitely. We should break out of it as well so that even
without any jobs in the queue, the workers will still gracefully stop
after receiving a TERM signal.

Change-Id: I6f2c69e44352e3c55a865d019e936b245e7d4ea8
Reviewed-on: http://gerrit.causes.com/44513
Reviewed-by: Shane da Silva <shane.dasilva@brigade.com>
Tested-by: Tom Dooner <tom.dooner@brigade.com>