Serialize fit results

This isn't ready to be fully pulled in yet, but it at least partially implements what we were talking about for serialisation: two basic classes that allow you to store the necessary information for fitting results.
(have tried the old ternary if `x = a < b ? y : None` but never bothered to see if it was there in a more Pythonic guise)