pack-write: simplify index_pack_lockfile using skip_prefix() and xstrfmt()