Add `state` object to Session instances

This provides a simple way to store state on the session that can be
accessed and shared by various components.

Fix #388