More robust generation of ensembles

By setting the max number of times a failed task is retried the DistributedEnsemble can recover from engines dying. I have verified this behavior in EC2 by manually killing an entire worker VM. 
I think this should be:
    engines = self.c.ids[:num_engines]
since the ids are not necessarily contiguous list of integers, especially if engines die and new ones join.