When we are chunking long descriptions for mediaobject instances
into separate HTML output files, and use.id.as.filename is
non-zero, if a mediaobject has an ID, use that ID as the basename
for the long-description file (otherwise, we generate an ID for it
and use that ID as the basename for the file).
The parallels the recent change made to cause IDs for legalnotice
instances to be used as basenames for legalnotice chunks.
Also, made some minor refinements to the recent changes for
legalnotice chunk handling.