Fix infinite pagination loop when offline
Fix infinite pagination loop when offline

I'm not really sure how this is meant to work - and I'm not sure
how it was working before, but this is causing fairly bad infinite
loops if I start element with no homeserver connection. This is
a fairly crude fix, only thing I can think that would be better is
some awareness of when network requests were failing and intentionally
backing off.

Fixes https://github.com/vector-im/element-web/issues/18242

matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk,matrix-org/matrix-react-sdk