Added minBy and maxBy methods

These methods are equivalent to the min_by and max_by methods in Ruby. They are useful for, say, finding the Point with the largest x-value. They've been written for efficiency rather than clarity and conciseness.