Improve CA code for interactive sessions
When passing the -i flag to a CA-based script the interactive session had no auto-completion no command history read/saved.
This MR is a proposal to enable these features making interactive sessions much more usable.
Also it fixes an issue in DerivationFrameworkConfiguration where the -i run option triggers a python error.