VID-1960 Task to purge cache for pages with gallery tag

I would use a constant offset rather than counting the number of $galleryPageTitles you get back, e.g.:
```php
$totalGalleryPageCount += PAGE_COUNT_LIMIT
```
If you request 1000 IDs, but then some of those IDs no longer exist as Titles, `$galleryPageTitles` will contain less than 1,000 entries, and your next query will end up selecting IDs you've already tried to process.  In the extreme case, if you ask for 1,000 IDs, and all 1,000 IDs do not exist, this loop will exit when there could be more, valid IDs further in the city_used_tags table.