WIP #333
Merge branch 'feature/333' of github.com:medic/kujua-lite into feature/333

Conflicts:
	lib/data_records.js
Fixed html on outgoing message record display for multiple messages #333

Displaying message details stacked in the expanded rather than collapsed
into one message.  It's overly repetitive, UI pass to follow once we get
feedback, for now just focusing on functionality.

If more than two recipients then display "x recipients" otherwise join
the recipients with a comma and potential ellipses.

Added optional messages parameter to @contact template helper.

Added pending/sent icons to outgoing message rows so you know the status
of messages at a glance.

Added message timestamp to each message detail.

Added `facility` property to message.

So bulk-sms/multi-recipient message generates a tasks property structure
shown below.  Considering adding the entire facility document to the
message object since that will be needed for display.

```
[
   {
       "messages": [
           {
               "sent_by": "admin",
               "to": "+525550761785",
               "facility": "d049925d-72da-063b-24ff65327348e7be",
               "message": "foo bar",
               "uuid": "f5daf0c1-61b7-1df5-79bec3aff4a9e750"
           }
       ],
       "state": "pending"
   },
   {
       "messages": [
           {
               "sent_by": "admin",
               "to": "+254771559999",
               "facility": "d049925d-72da-063b-24ff65327348420e",
               "message": "foo bar",
               "uuid": "f5daf0c1-61b7-1df5-79bec3aff4a9f553"
           }
       ],
       "state": "pending"
   }
]
```

Only assigning first recipient facility to record.related_entities since
that property determines who can view the record. Not sure how to handle
the record's permissions with a mult-recipient case yet.  Mabye reduce
the recipients list into the most common parent.  related_entities on
the record probably needs to be converted into a list eventually so a
record can belong to more than one district?  But this is a major
architecural change and would require changes throughout the code base.