hook: write hook output to ui fout descriptor
output on stderr will also be written to ui.fout, unless sys.__stdout__
is passed in (see util.system), thus not changing previous behavior.
This fixes a bug where hooks run through the command server would mess up
with the command protocol, sending non-channeled data to the client.