Fix search pagination

This fixes pagination for search results as they are wrapped in a layer. As you can read from the commit messages, I changed `Client#paginate` to take a block that can be used to write a custom concat process. The second changes search so it works with the newly minted block.