Persist dbus_control DBus Connection object

In real life creating (and destroying by dropping out of scope)
DBus Connection objects leaves DBus Adaptor objects pointing at
invalid connection object references.  Instead, persist a single
connection object using a scoped pointer and use this for all
objects.

Another observed side-effect is that creating a real device
in device_dbus_adaptor.cc yields a "DBus::ErrorNoMemeory" if
only kPath is used in device_dbus_adaptor.cc.  Although this
isn't a complete solution, this CL also adds a call to a
function "deviice->Name()" to add a unique path component.

BUG=chromium-os:15837
TEST=Run unit tests, run on real device and do ethernet plug/unplug

Change-Id: Icbfb3d8b845346c063a301217e562f3feee02c1b
Reviewed-on: http://gerrit.chromium.org/gerrit/1828
Reviewed-by: Chris Masone <cmasone@chromium.org>
Tested-by: Paul Stewart <pstew@chromium.org>
5 files changed