[Libguestfs] [PATCH v4 06/24] nbd/client: Simplify cookie vs. index computation