Comment.
Merge the 'sandbox-install' and 'install' commands.
Reindent for consistency with the rest of the file.
Merge the 'sandbox-build' and 'build' commands.
Add support for the sandbox mode to the remaining commands.

The commands that are implemented with 'wrapperAction' (haddock, hscolour,
register, clean, copy) don't require 'withSandboxDirOnPath', so their code is
not modified.