NPE fix in NameComparator when null strings are provided by the
caller. b/12894779

This is the integration of an Exchange fix from Motorola. As part
of this fix, unit tests have been introduced to verify that we
are experiencing the correct behavior. Writing these unit tests
required some factoring/unwrapped to make the code easier to test.

Change-Id: I3fe8278c56fb13e2e43f32c3eeba1cbe01ea3b8b
(cherry picked from commit 6fd3b6c35d930ee045cb6cfe3d6770d450b7b523)
2 files changed