Make a proper Cordova plugin (for iOS)

Also fix setApplicationIconBadgeNumber