Add a new analysis class that can use existing classes to perform analyses.

It should be easier to configure/save state etc with the code in a
class. It's already saving its data using a (modified) results manager.
Modify pyro code so as it can optionally use the new analysis class.