Cpu fixed iterations

Merge version with support for fixed number of iterations on the CPU back into the main branch. This update also includes a number of optimisations to the CPU algorithm, making it run a lot faster than before. The downside of this optimisation is that the algorithm is optimised to use a 2D gaussian with six parameters to fit the data. Fitting other function can still make use of the jaolho LMA package.