Rewrite reindex command to parallelize indexing tasks (bug 1025301)

Ok I guess that's fine for now, to revisit when we have millions of apps :p