trace: Put trace buffer on the stack instead of in the handle.

This makes more sense, and makes the code slightly closer to being
thread safe (although it's still NOT thread safe).
threads: Note that even innocent-looking functions need a mutex.

RWMJ was caught out by this one ...
generator: Typo in comment: "Checking" -> "Check".
generator: Add 'wrapper' flag to control when wrapper is generated.

Non-daemon functions normally have a wrapper function called
eg. guestfs_name.  The "real" (ie. hand-written) function is called
eg. guestfs__name.  The wrapper deals with checking parameters and
doing trace messages.

This commit allows the wrapper function to be omitted.  The reason is
so that we can handle a few functions that have to be thread-safe
(currently just: guestfs_user_cancel).  The wrapper is not thread safe
because it can call events and/or the error handler.
generator: Generate guestfs_user_cancel.

This function is now generated, so bindings in various languages
are made automatically.

Note that the function previously returned void, but now it returns
int (although always 0).  We don't believe that this is an ABI break
since existing programs will continue to work.
fuse: guestfs_umount_local is not thread-safe.

Despite what the documentation may have said, it certainly was not
safe to call guestfs_umount_local from another thread.

guestfs_umount_local could generate events, call the error handler, or
access other fields in the handle, with no locking at all.

We should aim to make guestfs_umount_local thread-safe in future.

See also:
https://bugzilla.redhat.com/show_bug.cgi?id=917706