[feature/twig] Put $SCRIPTS below overall_footer_after, use includejs for core

Moved below overall_footer_after so events can add JS files in that event.

PHPBB3-11598