Bug 990020 - [B2G][SMS] A MMS that has not been downloaded yet will display a "Missing SIM card" message after changing the SIM to a different valid one. r=julien

There are two commits here:
* Base fix;
* Refactoring of Messaging API error code.
Don't really like that we have explicit dependency on ```MessageManager``` and ```ThreadUI``` here, but can't think of any better way for now.