[lib] Refactor baseReducer
Summary:
issue: https://linear.app/comm/issue/ENG-5348/refactor-basereducer
We want to check this condition for every keyserver. See D1066 for context on what this code does
Test Plan: Tested that iff not connected, the inner ifs are run
Reviewers: michal, kamil, ginsu
Reviewed By: michal
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D9915