Refactor the PersistentBundle class.

Use generic programming.
Make the analysis persistent.

Put analysis specific code into a ExperimentAnalysis class. Save state
onPause and reload it on start.