OlmDevice: factor out a bunch of boilerplate
OlmDevice: factor out a bunch of boilerplate

Create some helper functions which help us reduce the boilerplate even further

williamboman/matrix-js-sdk,williamboman/matrix-js-sdk,krombel/matrix-js-sdk,krombel/matrix-js-sdk,williamboman/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,matrix-org/matrix-js-sdk,krombel/matrix-js-sdk,matrix-org/matrix-js-sdk