Bugfix for off-by-1 error in ResourceCollection#delete

This fix may be temporary, since a new idea for how to implement
ResourceCollection#delete popped up.

Andrew Gross (@awgross) helped me find, debug, and write this patch,
and he has a nice idea of how `unwind` should be implemented.

His idea is that we should not remove the resource from ResourceCollection,
because it may have unknown side effects (as it had and thus the bugfix),
and instead we should replace the resource with a fake resource,
a no operation (noop) valid resource, that when triggered, does nothing.

We need to investigate that idea, but it sound great and more error-prone.