offline: Split out connection controls
session: Move session.connection_state to session.connection.state
connection: Change set_connection_type into 'type' property
connection: Change set_connection_rules into multiple properties