RFCT : moved global out of _proc_subtool in compose.py

 - This is incremental work to make setting up the multi-process
   version
RFCT : moved node/tool iteration into a generator

 - more work to make multi-process easy