t/zbd: add close_zone helper function