Fix delayed_get_work() erroneously returning delayed_unemployed

delayed_get_work() seems to work only when there is one node in the AVL
tree (used as heap)! In the current implementation, a node can exist
without any tasks (after the tasks of a node are completed). It returns
delayed_unemployed when all tasks in the first node are emptied even if
the heap has other tasks. This commits makes sure that there is no node
without any tasks and returns delayed_unemployed only if the tree is
empty.

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Jim Lieb <jlieb@panasas.com>
Use LIST_EMPTY, LIST_FIRST macros insread of lh_first field

Signed-off-by: Malahal Naineni <malahal@us.ibm.com>
Acked-by: Dominique Martinet <dominique.martinet@cea.fr>
Merge branch 'tp/pseudo.readdir' into ibm_next_20_tmp
Merge branch 'tp/delayed' into ibm_next_20_tmp