Pagerfanta / Move pagination out of the Controllers (Actions) and into its own method

Move pagination out of the Controllers (Actions) and into its own method

This branch tries to apply the "separation of concerns" principle to the pagination in fork:

- Don't bind the model (db), view (tpl) and controller (action) together by pagination, but get the whole Collection from the model, and let the controller handle pagination entirely.
- We'll use Pagerfanta to handle the paging (they have really nice OOP way to do so)

Also, this breaks backwards compatibility for modules. I fixed the blog and search modules (as they're the only modules in frontend that are using pagination out of the box)


I did manage to keep some things though:

- Keep the same logic as before, but write it cleaner (for example, how many pages before an ellipsis is used,...)
- No changes to template files necessary
I would change


        $this->items = $this->parsePagination(
            $allItems,
            function($page) use ($url) {
                return FrontendNavigation::getURLForBlock('Blog', 'Archive') . '/' . $url . '?page=' . $page;
            },
            $requestedPage,
            FrontendModel::getModuleSetting('Blog', 'overview_num_items', 10)
        );

to


        $archiveLink = FrontendNavigation::getURLForBlock('Blog', 'Archive');
        $this->items = $this->parsePagination(
            $allItems,
            function($page) use ($url, $archiveLink) {
                return $archiveLink . '/' . $url . '?page=' . $page;
            },
            $requestedPage,
            FrontendModel::getModuleSetting('Blog', 'overview_num_items', 10)
        );

This way, we need to do the getURLForBlock call a lot less.