Effects of stochasticity on the length and behaviour of ecological transients