Don't calculate notifEvents until ready
Don't calculate notifEvents until ready

We were previously computing notifEvents at the point where we
processed them but before the room they belong to was stored.
This was problematic because some push conditions try to get the
room and therefore failed. Since the push actions are cached, this
spurious calculation also got cached.

This moves the calculation out to a separate function that gets
called only after the room has been stored.

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