Linear fitting

Yeah, so I added some linear fitting functionality. It's a naive approach, but works quite well and an exact result is always better than having to optimize numerically.
The calculation of the uncertainties of the fit parameters could be in another function, what do you guys think? It doesn't take all that much time to calculate them, but it would probably be nice not to do it if they aren't needed.