Rewrite the Pagination.

Apply this new one to issue, board and search.

For more details, See docs/technical/pagination.md