test: add tap output

Given UV_TAP_OUTPUT being set, test result output should use TAP formatting

This is a back-port of commit bfe269b from the master branch.

Conflicts:
	test/runner-unix.c
test: don't rewind_cursor when using tap_output

This is a back-port of commit 72bbf5d from the master branch.