ril: Use saner logic in determining the validity of an icc app

Instead of generic escape clauses, react to actually invalid data
to select a fallback.
Also, bail out early if the ICC is completely absent
Merge remote-tracking branch 'cm/cm-10.2' into HEAD