Merge mainline Synapse v1.18.0 into the `dinsic` branch.