Gatherer fix

Fixed gathering results for simulations which have different number of iterations.
Removed dead code in the server.
Added emailing of stack trace in error email.