API, pt II: Pagination

This adds pagination to the machines resource. Included in this PR is also a bonus commit that adds some testing of the serialization code.
OK, I understand the tradeoff, I'd just ask that it's made explicit in the docs and might be subject to change in future.