Use new class CNodeList to free nodes on exit.

Use a new "public" class CNodeList to hold lists of CNode* and to free
them on program shutdown.