Send an appClosed message with the instance ID of the app that was
closed. This will be picked up by Puter.js's AppConnection and reported
as a 'close' event.
To make this work, a `data-parent_instance_id` attribute is set on child
app windows. This is very similar to the `data-parent_uuid` attribute,
which tracks parent windows instead of parent app instances. (Dialogs
have a parent window, but are not apps, so don't have a parent app
instance.) The difference is subtle, and we may want to combine these in
the future, but currently closing an app will close any child windows,
which is not behaviour we want for child apps.
Adding `allow-storage-access-by-user-activation` which is important for permitting Safari to ask the user if the embedded app can use cookies, which enhances security, privacy and user consent.
See here for more discussion: https://github.com/HeyPuter/puter/issues/143#issuecomment-2008692100