[Libguestfs] [PATCH threads v2 2/5] threads: Acquire and release the lock around each public guestfs_* API.