[SPARK-4256] Make Binary Evaluation Metrics functions defined in cases where there ar...

...e 0 positive or 0 negative examples.
All of these checks look about the same across all 3 tests.  Could they be put into a private helper method which all 3 tests call?