Improve removal of core file from basic harness test

The segv.t subtest creates a core file, which on modern Linux
systems is named to include the PID.  Remove both core and core.*
to be sure that we get it.
Add diag_file_add and diag_file_remove functions

Add new diag_file_add and diag_file_remove APIs to the basic C TAP
library.  These functions manage a list of registered file that
contains supplemental diagnostic information.  Each registered file is
checked before each output function for any new lines, and any lines
are displayed as if they'd been passed to diag().  This can be useful
if, for example, the test involves a background daemon whose output
can be logged to a disk file.
Use a test cleanup function to remove c-diag-file log file

In the c-diag-file test suite, use a cleanup function to remove
the extra log file, which also tests that we process it before
running cleanup functions.
Don't die for unknown files passed to diag_file_remove

There are some cases where we may remove something twice, such
as removing a file in a cleanup handler, since we will have
already removed all diag_files before running cleanup handlers.
Just quietly ignore those instead of calling bail.
Release 2.4