shill: Added AttributeList.

Moved Nl80211Attribute types to a new AttributeList type.  This enables
handling nested attributes (which are shivering with the anticipation of
being added in the next checkin).  Lots of attribute-specific accessors
were moved from UserBoundNlMessage to AttributeList.

As part of this checkin, AttributeIterators were removed (direct
Attribute access was removed from the public interface and better ways to
do everything the iterator did were found).  A moment of silence, please.

The requirement of a non-NULL pointer parameter was lifted in the
Get*AttributeValue methods.  This allows code to check for the existence
of valid data for an attribute without having to supply a dummy
parameter.

BUG=chromium-os:36637
TEST=unittests.

Change-Id: I5f9212189508c1f95e74b8882956034a8642cdbb
Reviewed-on: https://gerrit.chromium.org/gerrit/39868
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Reviewed-by: Wade Guthrie <wdg@chromium.org>
Tested-by: Wade Guthrie <wdg@chromium.org>
Commit-Queue: Wade Guthrie <wdg@chromium.org>
diff --git a/callback80211_metrics.cc b/callback80211_metrics.cc
index fb5d0f1..41cf24d 100644
--- a/callback80211_metrics.cc
+++ b/callback80211_metrics.cc
@@ -25,12 +25,14 @@
   if (metrics_ &&
       message.message_type() == DeauthenticateMessage::kCommand) {
     Metrics::WiFiDisconnectByWhom by_whom =
-        message.AttributeExists(NL80211_ATTR_DISCONNECTED_BY_AP) ?
+        message.attributes().IsFlagAttributeTrue(
+            NL80211_ATTR_DISCONNECTED_BY_AP) ?
                     Metrics::kDisconnectedByAp : Metrics::kDisconnectedNotByAp;
     uint16_t reason = static_cast<uint16_t>(
         IEEE_80211::kReasonCodeInvalid);
     ByteString rawdata;
-    if (message.GetRawAttributeData(NL80211_ATTR_FRAME, &rawdata)) {
+    if (message.attributes().GetRawAttributeValue(NL80211_ATTR_FRAME,
+                                                  &rawdata)) {
       Nl80211Frame frame(rawdata);
       reason = frame.reason();
     }