A js class for running batches of ajax requests