refactor and simplify predicate handling
add errno helpers
implement nodelist_flatmap and nodelist_add_all
split up tests; test nodelist_add_all
make all module functions static; move add iterator to nodelist module; kill dead functions; support nodelist_add_all
support add all
add flatmap test
split bad input tests
add bad flatmap tests