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.