USBMS: Close all widgets before quitting
USBMS: Close all widgets before quitting

FFI finalizers can fire in unspecified orders, but for MuPDF,
we need to ensure that the context is the *very* last thing that get
destroyed.
As such, we need to make sure we close open documents properly on our
end, first.

This prevents potential crashes while switchign to USBMS inside an open
document handled by MuPDF.

Fix #7428

poire-z/koreader,NiLuJe/koreader,Frenzie/koreader,koreader/koreader,poire-z/koreader,NiLuJe/koreader,Frenzie/koreader,koreader/koreader