Add tests for Request.eachPage()

Also improve handling of thrown exceptions.