Add support for device dehydration ([MSC2697](https://github.com/matrix-org/matrix-doc/pull/2697)).