Convert MallinsonSolver class into plain functions

There was nothing but a parameter object and a start angle stored in it
anyway.

Added __repr__ function for MagParameters, allows calling str(..) on it.