CLI: add getter/setters for client/event context

Fixes https://trac.openmicroscopy.org.uk/ome/ticket/12388

To test this PR, minimally check the unit/integration tests are still green and that the CLI can still create connections.

/cc @ximenesuk 

--no-rebase