wpa_supplicant_8: Add changes from w1.fi and caf

Summary:
Increase global ctrl_iface buffer to same size as per-interface
Since the global ctrl_iface can be used with IFNAME= prefix to send
commands to be processed by per-interface code, it should have the same
(well, close to same since the prefix takes some space) limits on
command length as the per-interface ctrl_iface. Increase the buffer from
256 to 4096 to achieve this.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Git-commit: 8615bdfac90174c3730ae5e6607b85f8bbec847
Git-repo : git://w1.fi/srv/git/hostap.git
Change-Id: I8b5859457b488d83619262e39c41bf8d677b34a0
CRs-fixed: 607171

Track whether scan was started by us or an external program

This can be used to improve scan behavior in cases external
programs request scans directly from the driver.

CRs-Fixed: 570640
Git-commit: a5f40eff189d7f939f6434455ee63554ddb3c3ae
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>
Change-Id: I4af18ace907f4c736cec48b41f925a462d816a56

P2P: Extend the listen time based on the active concurrent session

A P2P Device while in the Listen state waiting to respond for the
obtained group negotiation request shall give a fair chance for other
concurrent sessions to use the shared radio by inducing an idle time
between the successive listen states. However, if there are no
concurrent operations, this idle time can be reduced.

CRs-Fixed: 606348
Git-commit: a2d63657603b8f0714274f34bea45cb5d0c0a7b9
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>
Change-Id: Ifbc6b7687889055764ef462abb710ef9a6c580a8

Ignore externally triggered scan results with scan_res_handler.

wpa_s->scan_res_handler is set only for cases where a scan operation is
requested for a specific purpose. As such, this callback should only be
called when a scan result from a scan that was triggered by
wpa_supplicant is processed.

CRs-Fixed: 570640
Git-commit: 06f9acce189b20daee8fe8fd46cd849425304130
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>
Change-Id: I75a34a885b19ef0115d47aba6c066a9672f71cf7

Do not use results from externally requested scan for network selection

It may not always be desirable to trigger reassociation or network
change based on scan results from externally to wpa_supplicant trigger
scan operations. Skip network selection and roaming determination if the
received scan result is known to be triggered by something external to
wpa_supplicant. The control interface SCAN command can be used to
request wpa_supplicant to determine the best network.

CRs-Fixed: 570640
Git-commit: 015af91fea2ec780cb44914bfc0cbc39932cf60d
Git-repo : git://w1.fi/srv/git/hostap.git
Signed-hostap: Jouni Malinen <j@w1.fi>
Change-Id: I9b2aba83dc5ecad36b426157ce0d4daa1d95fcbb

Test Plan: verify if it breaks on non-caf devices

Reviewers: synergy, jriordan001, raymanfx, donald.munn, rlasalle15, randall.rushing

Reviewed By: randall.rushing

CC: synergy

Differential Revision: http://review.codefirex.com/D410