Makes `synfit` into an object

I have changed the `synfit` function into an object.

All functions have been adapted to this, including the functions that
test the fits.