netd: Add enhanced routing support

Add support for policy and metric based routing APIs to netd. This
functionality is used for WQE, IMS, and Android QoS features.

Combined merge commit for following commits:

(cherry picked from Ia22847dd9611ff16eea25336716d4440461565e0)

netd: add metric support for routing
Add support for adding of cost (metric) of a route.
Changed call to ip from logwrapper to popen to handle errors caught during
a route operation.

netd: Add policy routing functionality to netd
Adding a new class RouteController to handle policy routing (source)
functionality in netd.
Installing a handler in CommandListener to handle policy routing
commands.

netd: Validate input argument for Route commands
Check for valid command line argument that is
passed to RouteController module.
CRs-fixed: 569443

RouteController: use fixed priority for ip rule
Use fixed priority when adding source policy rules
CR-fixed: 613222

Conflicts:
	server/CommandListener.cpp
	server/CommandListener.h

Change-Id: Ic828041d8f5be77a764ce22c45c5091ee8ae6dd2
wlan: Add softap support through ndc commands.

Changes required to support the softap commands
through ndc cli. This new support as part of the
64bit enablement and ndc is used for cli automation
in softap testcases.

Change-Id: I460a3785c3b4a44656281c7243ebdf921fe20f91
CRs-Fixed: 710050
netd: IPV6 tethering support

- Start NDP proxy daemon when tethering is enabled
- Add new interface commands "add_upstream" and "remove_upstream".
  Used to provide the complete set of interfaces to be proxied to
  the NDP proxy daemon
- Enable ipv6 forwarding
- After repeatedly toggling tethering/Wifi hotspot on and off, hotspot
  may not turn on anymore. It appears untethering is unsuccessful and
  this eventually leads to a timeout and a framework reboot. The NDP
  proxy daemon appears to be started multiple times even though there
  is no ipv6 upstream interface present. There appears to be a signifcant
  number of calls to fork and exec this daemon even though this
  functionality is not needed in this case. Fix this overhead by invoking
  the daemon only if there are atleast 2 interfaces to establish a bridge
  and proxy the NDP messages.

Conflicts:
	server/TetherController.cpp

CRs-fixed: 665103
Change-Id: I89170f8acd60b949ede749f353acd27363ff5798
netd-client: support for intercepting socket and connect

Allow for hooks to capture the socket and connect calls
and handle them in external shared lib

Change-Id: I0eb7ac3b819d0f08351f33a39051d2542635a3a0
Add support for ipv6 tethering stats

Requirement: Support for ipv6 tethering stats

Current implementation does not have support
for calculating the Ipv6 tethering  traffic

Solution:
Parse the ipv6 tether counter chains output
Update the output data to NetworkManagementService

Change-Id: I7d626b5697f5aa07c0266032a07be8f70a17f4e3
CRs-Fixed: 690173
netd: Fix 64bit incompatibility issue for NDC commands

Due to 64-bit incompatibility NDC commands output was not printed
on consolse. This commit handles 64-bit incompatibility issues and
ensures NDC command output are printed on console in proper format.

Change-Id: I4fe4dcdf9f991d361e6273bf715671c4cd160e76
CRs-Fixed: 726587
SOFTAP: Notificate the STA (dis)connect message

Create a thread to poll the hostapd's message
through the wpa_ctrl_* interface, and broadcast
the message to the uplayer.

CRs-Fixed: 685913
Change-Id: I4dd0326110c655fcd6cd5f8425be523d9e64ffa7