Added function linfit

The added linfit function provides a fast lightweight linear least squares fitting routine.