Fix room version comparisons
Fixes a set of bugs introduced by 00b77144,
where we replaced explicit RoomVersionId
matches with version < V11
comparisons. The Ord
impl on RoomVersionId
does not work like that,
and is in fact a lexicographic string comparison (source). The most visible
effect of these bugs is that incoming redaction events would sometimes
be ignored.
Instead of reverting to the explicit matches, which were quite verbose,
I implemented a RoomVersion
struct that has flags for each property
that we care about. This is similar to the approach used by ruma and
synapse.