Passing provider to lookupAdapter in session#close, and passing options to adapter

This fixes session#close so that custom adapters will no longer cause a "not implemented" exception.