shill: Fix the cellular service storage identifier.

This CL fixes a few issues:

- It bases the default cellular service storage identifier on the friendly
  service name.

- If service is GSM and IMSI is available, use it instead of the friendly name.

- Fix a bug where all legal characters in the storage identifier were replaced
  by "_" (rather than all illegal characters).

BUG=chromium-os:24952
TEST=unit tests

Change-Id: Ie55cb2b4f2dafb73545ac285a57674063946ceb3
Reviewed-on: https://gerrit.chromium.org/gerrit/15151
Tested-by: Darin Petkov <petkov@chromium.org>
Reviewed-by: Eric Shienbrood <ers@chromium.org>
Commit-Ready: Darin Petkov <petkov@chromium.org>
diff --git a/cellular.cc b/cellular.cc
index 9577a95..7cd274d 100644
--- a/cellular.cc
+++ b/cellular.cc
@@ -273,8 +273,8 @@
   service_ =
       new CellularService(control_interface(), dispatcher(), metrics(),
                           manager(), this);
-  manager()->RegisterService(service_);
   capability_->OnServiceCreated();
+  manager()->RegisterService(service_);
 }
 
 void Cellular::DestroyService() {