function to free all nodes in a list
ex 17.5.8 stack as list - push, delete_head, empty_the_stack and is_empty all working and tested
optionally print test names with -DTEST_VERBOSE