Implementation of pagination in task list

This for sure needs reviewing as I'm not fluent in js.
Also, I'd be glad to add tests before this is merged, and I can use some help.