Make using sudo more flexible.

Allow passing a block to run within sudo, or take individual
or lists of commands for sudo.  Remove assumed sudo from
within core tools.
Minor refactoring of Session to reduce complexity
WIP