Use common implementation of critic.Repository{,WorkCopy}.run()

Implementation copied from critic.RepositoryWorkCopy.run(), which had more
bells and whistles (overridden environment, setting $REMOTE_USER, and
supplying data on the process's stdin.)

The support for supplying data on the process's stdin was broken, so fix
that too.  It passed the data to Process.run() as an argument, but only
Process.call() supports that.  And Process.call() doesn't like when
process.stdout is set already, which we do.  So just set process.stdin
to a MemoryFile manually when stdin data is supplied.

Also set a flag 'supportsInput' on the function objects to allow existing
extensions to detect whether it is supported.