shill: Load values from the global profile into the manager

We persist parts of the manager's state to the global profile.
This CL allows it to load that state back in.

BUG=chromium-os:24991
TEST=New unit tests + manual (stop shill, change profile, restart shill,
make sure newly written out profile retains the change even if new
device entries have been written out)

Change-Id: I375d978be023d62d2a36d7239bc794be44dda593
Reviewed-on: https://gerrit.chromium.org/gerrit/14042
Reviewed-by: Thieu Le <thieule@chromium.org>
Reviewed-by: Gaurav Shah <gauravsh@chromium.org>
Commit-Ready: Paul Stewart <pstew@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
diff --git a/manager.cc b/manager.cc
index 5511376..f3f33e8 100644
--- a/manager.cc
+++ b/manager.cc
@@ -151,11 +151,15 @@
   DCHECK(profiles_.empty());
   // The default profile must go first on the stack.
   CHECK(file_util::CreateDirectory(storage_path_)) << storage_path_.value();
-  profiles_.push_back(new DefaultProfile(control_interface_,
+  scoped_refptr<DefaultProfile>
+      default_profile(new DefaultProfile(control_interface_,
                                          this,
                                          storage_path_,
                                          props_));
-  CHECK(profiles_[0]->InitStorage(glib_, Profile::kCreateOrOpenExisting, NULL));
+  CHECK(default_profile->InitStorage(glib_, Profile::kCreateOrOpenExisting,
+                                     NULL));
+  CHECK(default_profile->LoadManagerProperties(&props_));
+  profiles_.push_back(default_profile.release());
   Error error;
   string path;
   for (vector<string>::iterator it = startup_profiles_.begin();