Fix the implementation of `closewrite(::AbstractPipe)` (#57140)
Previously this would just call `closewrite(p.in)`, which would throw an
exception since `closewrite` isn't supported for the libuv stream
underlying `PipeEndpoint`.
This fixes the example in the `Pipe` docstring:
https://docs.julialang.org/en/v1/base/io-network/#Base.Pipe