Add a new "pagesdestroy" event, dispatched *before* the `BaseViewer` removes an existing document
Add a new "pagesdestroy" event, dispatched *before* the `BaseViewer` removes an existing document

This new event essentially mirrors the existing "pagesinit" event, and will allow e.g. a custom implementation of the viewer to be notified before the current PDF document is removed from the viewer.

By using this new event, we're thus able to dispatch a "pageclose" event for JavaScript actions when closing the existing document.

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