tests/c-api: Factor out common init_* into separate functions.
tests/c-api: Warn about deprecated functions in main program.

And replace deprecated guestfs_set_close_callback with
non-deprecated guestfs_set_event_callback.
tests/c-api: Remove global guestfs handle.

This will allow us to parallelize these tests.
tests/c-api: Various code refactorings.

- Don't use fixed names for the disks.  This will allow us to
  parallelize this test.

- Add a new "GETKEY:<key>" String parameter which can retrieve keys
  from the handle.  The temporary disk names are stored as keys.

- Don't test the close callback.  However this uses the close callback
  mechanism to delete the temporary disks, and in any case close
  callbacks are well tested by the language binding tests.

- The generated code now produces a static array of tests (instead of
  a 'perform_tests' function), making it possible to parallelize.