ndg: Bug in propagation of provenance info

Some applications (such as wcsalign) add provenance ancestors to the
output explictly using ndgAddProv rather than relying on NDG provenance
blocks. This is so that individual output NDFs can be associated with
individual input NDFs, rather than *all* outputs being associasted with
*all* inputs, which is what an NDG provenance block would do.

But the bug fixed by this commit meant that ndgAddProv did nothing unless
AUTOPROV was set to "1", resulting in ndgEndpv assiociating all outputs
with all inputs. Antonio was using wcsalign to align hundreds of POL-2
images, and this bug caused the size of the output provenance info to
blow up exponentially, causing wcsalign to take hours to complete.