shill: implement ping in shill in IcmpSession

Add IcmpSession, a class which wraps around Icmp to allow us to
perform ping in shill. When an object of this class is created
and started via IcmpSession::Start, it keeps sending ICMP echo
requests to a given destination at 1 second intervals until 3
echo requests are succesfully sent. IcmpSession then waits until
all echo replies are received (or a timeout occurs) before
reporting the latency for each echo reply to the caller.

BUG=chromium:216691
TEST=Compile shill and run unit tests.

Change-Id: Ia7e4e9381b6a496daf2fdc4df3008599ce1b312f
Reviewed-on: https://chromium-review.googlesource.com/272513
Trybot-Ready: Samuel Tan <samueltan@chromium.org>
Reviewed-by: mukesh agrawal <quiche@chromium.org>
Commit-Queue: Samuel Tan <samueltan@chromium.org>
Tested-by: Samuel Tan <samueltan@chromium.org>
diff --git a/shill.gyp b/shill.gyp
index a4f4b0e..7d66ea2 100644
--- a/shill.gyp
+++ b/shill.gyp
@@ -398,6 +398,7 @@
         'http_request.cc',
         'http_url.cc',
         'icmp.cc',
+        'icmp_session.cc',
         'ip_address_store.cc',
         'ipconfig.cc',
         'ipconfig_dbus_adaptor.cc',
@@ -615,6 +616,7 @@
             'http_request_unittest.cc',
             'http_url_unittest.cc',
             'icmp_unittest.cc',
+            'icmp_session_unittest.cc',
             'ip_address_store_unittest.cc',
             'ipconfig_unittest.cc',
             'key_file_store_unittest.cc',
@@ -648,6 +650,7 @@
             'mock_external_task.cc',
             'mock_glib.cc',
             'mock_http_request.cc',
+            'mock_icmp.cc',
             'mock_ip_address_store.cc',
             'mock_ipconfig.cc',
             'mock_link_monitor.cc',