Use find_in_batches to generate sitemaps

Whilst limiting the size to 50,000 has reduced the amount of memory consumed
when serving large sitemaps, it hasn't improved it as much as we'd like.

We found that using find_in_batches resulted in much reduced memory usage.

find_in_batches doesn't respect (silently ignores) any limit and ordering used,
hence the jury-rigged `break` code.