Add account locking as per [MSC3939](https://github.com/matrix-org/matrix-spec-proposals/pull/3939).