rewrite of repsim2

repsim2 is now more or less vectorised, the previous way was really
stupid. Now lineprof basically shows no activity other than running the
actual sim. Cut of ~50% time.