Make binSearch method tail-recursive for RidgeRegression

This pull request restructures the `binSearch` method slightly so that it is tail-recursive. All tests in `RidgeRegressionSuite` pass after this change. The tail-recursive version should be faster since it will get compiled down to a while loop by the scala compiler.