Remove JSON next link when rendering new results

The JSON next link tells the infinite scroll where to get the next page
of results from. We weren't however, ensuring that the previous link has
been removed before adding the new one. The code that looked for the
next link only checks the first one on the page, which was the wrong one
in most situations.