commit after comping dates for a product

Computing delivery dates for all products can take a few seconds per
product, and if there are many, they all go in a single long-lived
transaction that can be easily interrupted.

To avoid that, I create a new cursor and commit after dealing with every
product.

That feature can be disabled in situations where multiple cursors are
harmful, like when running the tests.
lint tests