Bug 904076 - fixing a bug in the call log db creation path.
r=rik
Merge pull request #11485 from etiennesegonzac/bug-904076-call-log-db-create

Bug 904076 - fixing a bug in the call log db creation path. r=rik
Bug 897437 - SMS message timestamps do not display the expected strings. r=gnarf

Rewrote the message container handling function. Now with lots of unit tests
covering lots of edge cases.

This patch also does a very little bit of safe refactoring, still with unit
tests.
Bug 903947 - [Messages] The last recipient is copied everytime when selecting recipeint for removing r=julienw

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

- Clicks on accepted recipients...
    - Should close the keyboard, if it's a known contact recipient
    - while manually entering a recipient:
        - Two rendered recipients
        - A placeholder for the cursor
    -  with only accepted recipients:
        - no changes, no assimilated recipients
    - with no placeholder at end of list:
        - no changes, no assimilated recipients
    - Ensure MockDialog triggers are assigned an initial called value (false)

This patch also fixes https://bugzilla.mozilla.org/show_bug.cgi?id=903943

Signed-off-by: Rick Waldron <waldron.rick@gmail.com>
Bug 904640 - [Messages] Keyboard should always close when pressing Send r=julienw

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

- Remove focus from all elements before panel change by calling document.activeElement.blur() in MessageManager.onHashChange
- Updates Mocks:
    - MockThreadListUI to contain all properties (data and method)
    - MockThreadUI to contain all properties (data and method)
- Tests MessageManager.onHashChange:
    - Remove any focus left on specific elements
        - Assert on spy intel for document.activeElement.blur
    - Exit edit mode (Thread or Message)
        - Assert on spy intel for:
            - ThreadUI.cancelEdit
            - ThreadListUI.cancelEdit
    - Reset Group Participants View
        - Assert on spy intel for ThreadUI.groupView.reset

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