[MINOR] added support for dual-linked lists

Imported dual-linked lists management macros from the old scheduler project,
and fixed a long-standing nasty bug in the DLIST_ADD() macro.
1 file changed