Re-work pagination and add tests.

Here's a first version. This version doesn't include `next` or `previous` in the metadata if a number for page can't be found. This is only really expected to happen when `next` or `previous` are null for the first and last page. An alternative would be include `next` and `previous` in the metadata and set them to -1 for the first and last pages. What do you think?

I also still need to write user facing docs but I'm waiting for that to be setup.
I made `extractPageNumber ` nested in `extractMeta` because it's only intended to be used in `extractMeta` - a sort of a private function for `extractMeta`. I would put it as a private method on the serializer if other serializer methods also need to use it. I'm not stuck on this though. I initially had `extractPageNumber ` on the serializer and changed it to the nested function before I committed it. Let me know if you prefer the other style and I'll change it.