core: Improve documentation and test coverage for compare()

* Methods should have a single line description in the imperative
  mood. Most do this already, but a few slipped over time.
* Drop redundant (and now inaccurate) "(Object, Object)" from
  the test name for OO#compare. Simply use the method name as
  test name (like other tests do).
* Add `null` as supported type for parameter a and b to OO#compare.

Change-Id: I625126560c0733ac208e3cfa97661edef68da7e7