Refactor mobilenetwork.js code (bug 1056088)

https://bugzilla.mozilla.org/show_bug.cgi?id=1056088

Since we are becoming a real packaged app, it's time to clean-up that code.