Update pagination.php

This makes sure that page numbers higher then possible are reset to page 1. Big thanks to @rizerzero for pointing it out and providing an example in https://github.com/rizerzero/Flexible-PHP-Pagination

I updated it a little bit to add it to the Shorthand Syntax I already had. Saves a bunch of code. I've just re-installed my PC so I can't test it right now. Feel free to make an issue if something goes wrong.