test: don't close connection on write error

The echo server shouldn't close the connection when there's an error on
write. Instead simply echo the error message and allow the other side to
close the connection.

Also do a partial revert of 4d905fb where after_shutdown was removed.

Fixes: 4d905fb "test: close stream immediately on error"
Signed-off-by: Trevor Norris <trev.norris@gmail.com>
Signed-off-by: Saúl Ibarra Corretgé <saghul@gmail.com>
doc: add API documentation
doc: mention API documentation in README
include: cleanup uv.h

Remove comments describing the API which are now part of the
documentation, thus avoiding future comment rot (and removing the
existing part).