This is more flexible than before, since third-party code can add new
output target types without advising these functions. It also
resolves an issue where redirecting to a symbol that has a value in
its function slot doesn't work.
* lisp/eshell/esh-io.el (eshell-virtual-target): New struct.
(eshell-get-target, eshell-output-object-to-target): Reimplement via
'cl-defgeneric'.
(eshell-close-target): Reimplement via 'cl-defgeneric' and simplify
'process' method.