[!!!][BUGFIX] Improve pagination

the pagination is buggy on several places.
therefore the code from fluid/cms should be used

Change-Id: I5f4be868f39160e82ff6a0678489d6221b911370
Resolves: #54007
Reviewed-on: https://review.typo3.org/25707
Reviewed-by: Georg Ringer
Tested-by: Georg Ringer