[common] Add several additonal ways to create a `UI`.
[common] Add several additonal ways to create a `UI`.

This change introduces 3 new mechanisms for creating a `UI` struct,
initially for the purposes of helping testing but these may be helpful
in future UX modes like a "slient" mode.

* Adds a `UI::new(shell: Shell)` function that takes a `Shell`.
* Adds a `UI::with_streams(...)` function that takes specific IO
streams. This can be used by testing code to create temporary
stdout/stderr buffers which will not produce output during tests and
allow a tester to check for the output from a command.
* Adds a `UI::with_sinks()` function that produces a `UI` which takes no
stdin and sends both stdout and stderr to a `Sink`.

Signed-off-by: Fletcher Nichol <77a0fd9e8048bbacd11af4e957bc6ff03b549f49@nichol.ca>

nathenharvey/habitat,nathenharvey/habitat,rsertelon/habitat,habitat-sh/habitat,rsertelon/habitat,georgemarshall/habitat,georgemarshall/habitat,rsertelon/habitat,habitat-sh/habitat,nathenharvey/habitat,georgemarshall/habitat,habitat-sh/habitat,georgemarshall/habitat,georgemarshall/habitat,habitat-sh/habitat,habitat-sh/habitat,habitat-sh/habitat,habitat-sh/habitat,georgemarshall/habitat,georgemarshall/habitat,georgemarshall/habitat,rsertelon/habitat,nathenharvey/habitat,habitat-sh/habitat,nathenharvey/habitat,rsertelon/habitat,rsertelon/habitat,rsertelon/habitat,nathenharvey/habitat