CleanupService doesn't register resources if inside transaction

Methods that returned ResourceIterator still does so, but the actual
returned iterator may not be registered for cleanup if the call was made when
inside a transaction. This is because the transaction will close statement
contexts (i.e. the resource) so it would be unnecessary strain on CleanupService.