Group threads have been implemented as MMS on all major smartphone operating systems. Unfortunately, Android didn't get it until Android 4.2 or something.
The key is that the recipient list is sent with the message, so the other clients know who else is participating in the group, and can also thread and send outgoing messages accordingly.