Configure default page size

This adds the config variable 'paginate:defaultPerPage' which allows people to override the default page size.

Also fixes bugs with current implementations of the paginate directive.

***Tests coming***
removing