MINOR: session: add a simple function to retrieve a session from a task

This function only casts t->context to (struct session *). It will
avoid some ugly and unsafe casts in upcoming changes.
1 file changed