src: Avoid state regressions

When the SIM state is switched to ready, the modem was assumed to be in
PRE_SIM state, which is not always the case for some modems. This caused
the modem to go to OFFLINE, and then to ONLINE, but the modem was
already ONLINE, and this implied removing some already available atoms.

The root cause is that for some modems when the radio is off you cannot
access the SIM, so the SIM atom is created when they move to ONLINE.
plugins: add Android APN provisioning plugin

Add plugin for GPRS provisioning support through
the Android APN database.

Signed-off-by: Tony Espy <espy@canonical.com>
build: add Android APN provisioning plugin support
gril: Changes to support MTK modem

* Add a vendor flag that can be checked as needed
* Add hooks to print vendor specific requests and events
* Treat differently some parcels for the MTK modem
* Add deprecated radio states, needed by MediaTek modem
src: fix build failure on ppc64le arch
btio: fix build failure on ppc64le arch
Merge pull request #61 from tonyespy/ppc64le-fix-build

Ppc64le fix build
plugins: Support mtk modem

* Create new mtk plugin
* Support mtk in rildev
* Modify ril plugin to support changes in gril and in rilmodem sim atom
interface
rilmodem: Changes to support mtk modem

* MTK modem specific behaviour is addressed
* spn-table plugin support is added to network-registration
* Change in rilmodem sim interface
* Fix not checking properly null pointer in gprs atom
* gril changes are addressed
* Add file with list of rilmodem modem types
mtkmodem: New mtk modem driver

This driver provides support for MediaTek modems. Most of the
functionality is already provided by the rilmodem driver: this driver
provides support for specific MTK parcels and voicecall and gprs atoms.
These atoms are separated from those in rilmodem as they use specific
MediaTek requests and events. This will allow us to move the driver to
a dynamically loaded plugin if desired.
include: New interface for spn-table type plugins

This new plugin type allows adding plugins that can be used to search
for operator names if the modem is not able to find it for a given
MCC/MNC pair.
src: Add support for spn-table type plugins
plugins: Add android-spn-table plugin

This plugin looks for the SPN in the spn-conf.xml Android file.
build: Add plugins for MTK modem support

* Add mtk, androidspntable, and mtkmodem plugins
* Add support for spn-table type plugins
plugins: minor cleanup of android_provision/apndb

Minor style cleanup of android-provision.c and
android-apndn.c.  Also fixed two minor bugs in
android-apndb.c:

1. Change attribute from "username" to "user" to
match the correct schema.

2. If an <apn /> element is found with a missing
"type" attribute, log an error, but don't fail
provisioning.
android-apndb: update context type handling

Return TYPE_INTERNET for apns with a 'type' attribute
prefixed with 'default'.  Return TYPE_MMS for apns with
'type=mms'.  Otherwise return TYPE_ANY.  Also updated
attribute handling, and added logic to strip any leading
"0"s from mmsproxy IPV4 addresses, so they're not
misconstrued as octal numbers by the ofono core gprs code.
src: allow MessageCenter/Proxy for TYPE_INTERNET

Allow a MessageCenter and MessageProxy to be set for an
OFONO_GPRS_CONTEXT_TYPE_INTERNET contexts in order to
support combined Internet/MMS contexts.
Merge pull request #62 from tonyespy/mms

+1, re-tested on make image #237 too.
plugins/ril: add dedicated MMS gprs-context

We now add a second dedicated MMS gprs-context
in addition the existing context created for Internet.
Merge pull request #63 from tonyespy/mms

plugins/ril: add dedicated MMS gprs-context