Bug 745283 - Part 1: Expose nsINetAddr for the local address of nsUDPSocket and support send with InputStream. r=jduell, r=mayhemer

--HG--
rename : netwerk/test/unit/test_bug952927.js => netwerk/test/unit/test_udpsocket.js
Bug 745283 - Part 2: Add udp-socket permission. r=sicking, r=baku
Bug 745283 - Part 3: Support send input stream and multicast operation via PUDPSocket.ipdl. r=jduell, r=mt
Bug 745283 - Part 4: WebIDL binding for UDPSocket API. r+sr=smaug, r=khuey, r=baku
Bug 939318 - Detect network interface changes on windows properly. r=mcmanus

Now supports IPv6 as well if a new enough windows version is used.
Which notification function to use is detect at run-time.

Now sends CHANGED event if the online interface(s) are different in any
way since it was previously checked and considered UP. CHANGED is sent
before UP in case both are detected.

nIOService: split up the network event receiver function from the
network status init function and have the event receiver act on the
incoming event.

DNSservice: acts on network changes (flushes the host cache)

HttpHandler: acts on network changes
Bug 939318 - Find and close HTTP connections without traffic after network change. r=mcmanus

SPDY/http2 connections get a ping and be allowed N seconds to respond.

Active HTTP connections will be allowed N seconds to get traffic, if they
don't afer N seconds they get closed to avoid risking stalled transfers.

N is 5 by default: pref is "network.http.network-changed.timeout"
Bug 939318 - protocolproxy service acts on network interface changes. r=mcmanus
Bug 939318 - Websockets act on network interface changes. r=mcmanus

If there's no outstanding PING, send a new to make sure the connection
is still alive and fine.
Bug 939318 - Send network changed event when returning from sleep. r=mcmanus

Coming back from hibernation, the network situation is unknown and may
have changed since the computer went into sleep.
Bug 939318 - Introduce the "network.notify.changed" prefs. r=mcmanus

Makes it possible to disable 'changed' events.

Disable the events in test_ping_aboutnetworking.js and in
test_proxy-failover_passing.js