Move JS from html files to forum_fn.js

Ticket: http://tracker.phpbb.com/browse/PHPBB3-11795
RFC: http://area51.phpbb.com/phpBB/viewtopic.php?f=108&t=44477