Properly return ErrCursor on cursor timeouts.

Fix by Daniel Gottlieb.