Bug 909343 [Clock] Refactor Date Math Utilities

Refactor `utils.js` to provide methods for:

* Conversion to milliseconds from objects with duration values, e.g. `{hours: 4, seconds: 12}` (for any combination of hours, minutes, seconds, etc.
* Conversion from millisecond interval to object with duration values.
* Safely add millisecond or objects with duration values to `Date` objects or millisecond counts
* Add tests for datemath conversions