General improvements to scoped sessions; autoclose on context teardown.