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.
Un-used arguments, can we remove them?