Revert "Bug 898666 - [clock] Clock refactor alarm object and add test"

This reverts commit 3746b1cdc0e344460c58cd52f85564b0c4f5940a due to a
UI regression in the ordering of Alarm list items.
Bug 910722 - JavaScript linting rules are too strict

r=rik
Revert "Merge pull request #11751 from rexboy7/fix-bug900838"

This reverts commit 92d9a334d52514ac521ac0bb39add28e373bcc33, reversing
changes made to 92b79a2dfe09d950e3789247a21e13083116ec0a.
Revert "Bug 910722 - JavaScript linting rules are too strict"

This reverts commit 5db143d5aa532aacbc1522c885ad38849ebd20b9.
Bug 898666 - [clock] Clock refactor alarm object and add test

(Rebased with UI regression fix for alarm ordering.)

1. An Alarm constructor is used to create new Alarms, instead of
   creating new object literals.
2. The AlarmsDB API is changed to pass error messages in the
   function(err, value) {...} style.
3. Asyncronous API calls are checked using callbacks. The async
   functions in Utils make this easy (although including async.js
   would be easier.
4. Testing is added for the Alarm object.
5. Added mock_alarmsDB and mock_mozAlarms for testing Alarms
6. Fixed alarm_edit tests. Moved to a new alarm_edit_test.js file.
7. Add tests for new utils methods (async and safeCpuLock)
8. Rename some variables. Remove "_name" naming scheme.
9. Removed in app alarm set indicator
10. Protect id, repeat, and enabled properties on the Alarm object.

r=jugglinmike
Bug 910313 - [Clock] Generate DOM from markup source template interpolation. r=jugglinmike r=gnarf r=djf

https://bugzilla.mozilla.org/show_bug.cgi?id=910313

- Moves Utils.Template from Messages (apps/sms) to shared/js
- Renames Utils.Template => Template
- Moves Template tests to apps/system/test/unit/ (template_test.js)
- Updates usage in Messages
    - Replace Utils.escapeHTML() with Template.escape()
    - Replace Utils.Template with Template
- Implements Template in Clock
    - Replace markup string in program code with template calls

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Bug 910313 - [Clock] Generate DOM from markup source template interpolation. r=jugglinmike r=gnarf r=djf

https://bugzilla.mozilla.org/show_bug.cgi?id=910313

- Moves Utils.Template from Messages (apps/sms) to shared/js
- Renames Utils.Template => Template
- Moves Template tests to apps/system/test/unit/ (template_test.js)
- Updates usage in Messages
    - Replace Utils.escapeHTML() with Template.escape()
    - Replace Utils.Template with Template
- Implements Template in Clock
    - Replace markup string in program code with template calls
- Make desktop friendly
   - check mozSettings
   - use mozAlarms mock

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>