shill: cellular: Improve CellularCapability*::IsRegistered().

This CL makes CellularCapability*::IsRegistered() a const method and
adds a unit test for CellularCapabilityUniversal::IsRegistered().

BUG=None
TEST=Build and run unit tests.

Change-Id: I4171f2127822942c2633ac3479c4c5028bfda576
Reviewed-on: https://chromium-review.googlesource.com/176872
Reviewed-by: Prathmesh Prabhu <pprabhu@chromium.org>
Tested-by: Ben Chan <benchan@chromium.org>
Commit-Queue: Ben Chan <benchan@chromium.org>
diff --git a/cellular_capability_cdma.cc b/cellular_capability_cdma.cc
index 585b92c..7f4adc5 100644
--- a/cellular_capability_cdma.cc
+++ b/cellular_capability_cdma.cc
@@ -251,7 +251,7 @@
       activation_state_ == MM_MODEM_CDMA_ACTIVATION_STATE_ACTIVATING;
 }
 
-bool CellularCapabilityCDMA::IsRegistered() {
+bool CellularCapabilityCDMA::IsRegistered() const {
   return registration_state_evdo_ != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN ||
       registration_state_1x_ != MM_MODEM_CDMA_REGISTRATION_STATE_UNKNOWN;
 }