Add serialization for Pagination objects

* Also adds test cases for pagination
Merge pull request #157 from sharoonthomas/develop

Add serialization for Pagination objects