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