irmin-pack: Fix assert failure in file_manager
irmin-pack: Fix assert failure in file_manager

The code assumes that the uninitialized instance reference is not
accessed during creation of the components (dict, suffix and index), but
in use, the index was observed to call the callback before the instance
was set to Some _, thereby triggering the assert.

With this fix, if a callback from index occurs before instance is
initialized, the callback is ignored. This should be safe: we are merely
opening the components, so the dependencies between components and the
order that they are flushed should not be relevant.

See https://github.com/mirage/irmin/issues/1963 for the issue report.

mirage/irmin,mirage/irmin