Fix for linear model adjusted R-squared

Fix for issue #194
1) Decrement n instead of 1
2) Use safe-div
3) Add unit test for R^2 and adjusted R^2