Dispatch a "Doc/WillClose" event, when scripting is enabled, when closing the document
Dispatch a "Doc/WillClose" event, when scripting is enabled, when closing the document

This event is mentioned in the specification, see https://www.adobe.com/content/dam/acom/en/devnet/acrobat/pdfs/AcrobatDC_js_api_reference.pdf#G5.1963176, and it's also listed as a valid type in https://github.com/mozilla/pdf.js/blob/fb87704b386bdc940ceef4eff31b1374432a6122/src/shared/util.js#L164-L170

Since we're already dispatching a "PageClose" event in this case, it seems reasonable to *also* dispatch a "Doc/WillClose" event as well.

mozilla/pdf.js,nawawi/pdf.js,timvandermeij/pdf.js,mozilla/pdf.js,macroplant/pdf.js,Snuffleupagus/pdf.js,showpad/mozilla-pdf.js,Shoobx/pdf.js,macroplant/pdf.js,Shoobx/pdf.js,timvandermeij/pdf.js,Shoobx/pdf.js,Snuffleupagus/pdf.js,mozilla/pdf.js,showpad/mozilla-pdf.js,showpad/mozilla-pdf.js,xavier114fch/pdf.js,xavier114fch/pdf.js,timvandermeij/pdf.js,nawawi/pdf.js,nawawi/pdf.js,Snuffleupagus/pdf.js,macroplant/pdf.js