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.
I moved `handleConnection()` outside `detectMobileNetwork()` and removed `setFromSIMPair()` to stop having functions mutating variables from their parent scope. What do you think?