Bug 844900 - Replace SMS "Desktop Mock" with mozSms mock

Mock out the native mozSms API in environments where it is not defined
(e.g. FireFox and B2G-desktop). This promotes code re-use across
environments. This work introduces message deletion in desktop
environments by mocking `mozSms.delete`.

Reference global variables to enable optional control of simulation
behavior.

Update the application's usage of the mocked `SMSRequest` object to
properly reference the `error.name` property defined on `DomRequest`
objects.

r=julienw
(cherry picked from commit ae2a435a39e7cb35a63f73edcfa4b4cbcf0ab1dd)

note from uplifted: Also took the part of Bug 859662 that was not uplifted
because this one was not uplifted.

Conflicts:
	apps/sms/js/contacts.js
	apps/sms/js/message_manager.js
	apps/sms/js/thread_ui.js