Refactor Resource.wrap to work with any Enumerable object

Allows it to wrap a collection proxy.