[BUGFIX] List module pagination broken

A wrong formula is used to calculate the pointer
for the pages.
This patch also introduces a central function for
calculating the pointer to a page.

Resolves: #55320
Releases: 6.2
Change-Id: Ia4eec61f4f87b52d0d5e940e542998f9f82aa140
Reviewed-on: https://review.typo3.org/29949
Reviewed-by: Marcin Sągol
Tested-by: Marcin Sągol
Tested-by: Tymoteusz Motylewski
Reviewed-by: Wouter Wolters
Tested-by: Wouter Wolters