Introduce lazy sessions

Session contexts are only created when requests actually change data,
instead of creating contexts whenever a session starts.