Place bottom scripts before the closing body tag

We used to place them after the closing body tag. Both work in practice, but being within the body follows the HTML spec.
Processes: add scope and XForms actions
Persistence proxy: close stream, rename, add comments
fr:alert-dialog: support xxforms-dialog-open
xxf:show/xxf:hide: don't restrict to xxf:dialog