io-threads: Refactor ordered worker exit path
io-threads: Refactor ordered worker exit path

This patch re-factors the exit path of an ordered worker
on a time-out. Earlier we're checking for exit permission
in such a way that required us to release and acquire
the worker lock a second time in the worker loop opening
a window wherein a new request could've been appended to the
request queue.

This patch makes the decision to exit while still holding on to the
worker lock.

Signed-off-by: Anand V. Avati <6a1810c170bd423868ce2e225ecea39d80cade0f@amp.gluster.com>

Kaushikbv/Gluster,Kaushikbv/Gluster,Kaushikbv/Gluster