Fix #485 by settings value of `returns` to undefined during reset

This pull request ensures that `reset` will also set the return value from a stub back to `undefined` in line with the expectations expressed in #485

It's a bit of a cludge, as some of the api is a bit convoluted and state is spread out. Hopefully, future refactorings will tidy this up.