Make the total_result attribute an integer

 - Also, add a test
arxiv_search: split out the search-in-batches as separate function