These are both part of Matrix 1.4 which has now been released. For now, support both the unstable and stable identifiers.
Consider an event to be part of a thread if you can follow a chain of relations up to a thread root. Part of MSC3773 & MSC3771.