shill: fix bug in Manager::GetEnabledDeviceWithTechnology

When looking for an enable device for a technology, we first
filter the devices by technology, then return the first enabled
device (if any).

Due to a typo in a refactor, these two steps were not tied together.
We would filter by technology, and place the results in the
local variable |devices|. Then we would return the first enabled
device from the member variable |devices_|.

Resolve this by simplifying the interface of FilterByTechnology.

While there: fix ordering of FRIEND_TEST declaration in device.h.

BUG=chromium:397763
TEST=new unit test

Change-Id: I990b09398a096bee07ce38aab15a42976a78b54d
Reviewed-on: https://chromium-review.googlesource.com/236072
Trybot-Ready: mukesh agrawal <quiche@chromium.org>
Tested-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Paul Stewart <pstew@chromium.org>
Commit-Queue: mukesh agrawal <quiche@chromium.org>
diff --git a/manager.h b/manager.h
index 896c44e..6259025 100644
--- a/manager.h
+++ b/manager.h
@@ -125,8 +125,8 @@
 
   virtual void UpdateWiFiProvider();
 
-  void FilterByTechnology(Technology::Identifier tech,
-                          std::vector<DeviceRefPtr> *found) const;
+  std::vector<DeviceRefPtr>
+      FilterByTechnology(Technology::Identifier tech) const;
 
   ServiceRefPtr FindService(const std::string& name);
   RpcIdentifiers EnumerateAvailableServices(Error *error);