initImageData.php perf tweaks

* Only process non-redirects
* Wait for slaves after every page

Change-Id: Ic948cc946f1949f70e54f70cd39b938bfb2863a6