Fix a bug in Stats.minBy.
temporarily adding some tests
Add tests for Stats.maxBy and Stats.minBy
revert the temporary changes which don't compile.
fix the test: result type mismatched.

okay this time it should work.
Merge pull request #262 from devjuice/master

Fix a bug in Stats.minBy.