Move the `Pagination` class into the `library` folder (see #4726)