Refactor tool to prepare for pseudo-builders.
Refactor tool to prepare for pseudo-builders.

Refactor the tool in preparation for the pseudo-builder refactoring.  This
basically just moves nested functions and some objects to the top level of the
file and renames various items.

marcecj/scons_asciidoc