Rebuild example.py atop new Builder class

This is a new way of breaking out the logic of building from the
particular way that one application might choose to drive its
computation.  We also here upgrade example.py to Python 3.