MB-11870 Avoid polling starvation in mixed priorities

1) Wake up threads from the correct Q in mixed priorities.
2) If a thread has just woken up off a high priority Q
then make sure it polls the low priority Q next.
Not doing this causes starvation in the low prioirty Q
resuling in rebalance hangs.
3) Avoid sleeping threads for longer than 2 seconds to avoid
missing posts from other threads
Change-Id: I6cef6153285098e2f77639c50b194c9a9541dd24
Reviewed-on: http://review.couchbase.org/40242
Reviewed-by: Chiyoung Seo <chiyoung@couchbase.com>
Tested-by: Chiyoung Seo <chiyoung@couchbase.com>