Bug 822712 - Simple Push notifications for b2g - Interfaces sr=jonas, a=blocking-b2g:leo+

--HG--
extra : rebase_source : 63ec373f1bf72907f11e63b680c54b667d2095ed
Bug 822712 - SimplePush WebSocket implementation, r=dougt, jlebar, jst. a=blocking-b2g:leo+

This patch sets up the build.

Push.js is the object that sits on navigator as navigator.pushNotification.
PushService always runs as soon as Gecko starts.

Folded:
Bug 822712 - setup, initialization
* * *
Bug 822712 - Notify app/site using system messages
* * *
Bug 822712 Extra notification, bad code but needed to prevent massive MQ conflicts
* * *
Bug 822712 - Parallel requests prohibited for sync. Needs tuning.
* * *
Bug 822712 - Protocol implementation
* * *
Bug 822712 - Use origin instead of manifest as identity for sites. Use DOM principal too.
* * *
Lots of changes to system messages to try out things. WIP
* * *
Minor PushService fixes for Android.
* * *
Add Push[Service] files to the Android package.
* * *
Bug 822712 - Remove registration sync attempt in register callback
* * *
Bug 822712 - Don't clear pending requests on websocket disconnect
* * *
Bug 822712 - Mark creation time of request
* * *
Bug 822712 - Retry conflicting channelIDs
* * *
Bug 822712 - Webapps.jsm cannot be imported in child processes.

This will prevent us from delivering system messages to the page specified in the manifest.
FIXME
* * *
Bug 822712 - Three changes

Do not fake desktop notifications, they are not working.
Add necko_websocket.xpt to b2g build.
onStop is not the same as onServerClose. the status is a NS_ error code. This needs further fixes
* * *
Bug 822712 - Prefs exceptions
* * *
Bug 822712: Use Preferences to prevent exceptions
* * *
Bug 822712 - Start WebSocket if we have registrations
* * *
Bug 822712 - Reconnect on socket error
* * *
Bug 822712 - Send channelIDs in hello
* * *
Bug 822712 - Unregister should clear local database first
* * *
Retry connecting to server with exponential backoff

--HG--
extra : rebase_source : 252fff15ec81dc08faf91fba3b066af91f9989b4
Bug 822712 - Start UDP socket on boot if required. r=dougt, jlebar, jst, a=blocking-b2g:leo+

--HG--
extra : rebase_source : 59f84f274dc14ddac7d3c5318d5f7dacce1add2b
Bug 822712 - SimplePush - Add PushManager to the test_interfaces.html test. r=dougt a=blocking-b2g:leo+

--HG--
extra : rebase_source : ef31a3fcf52b5723c23e80c386c8e294eb1ecffa
Remove all moz.build files. r=ryanvm. a=buildgod

--HG--
extra : rebase_source : 8df564b712b784a61b27ae23ad5ff5cd81988ee4
Bug 822712 - Port to b2g18. r=nsm, a=blocking-b2g:leo+

--HG--
extra : rebase_source : 5e68f8192f6b993ff3c4d0f60dac28c786eace03