[ticket/9341] Use U_PREVIOUS and U_NEXT in template files

PHPBB3-9341