[lib] Refactor keyserver reducer pt.1
Summary:
issue: https://linear.app/comm/issue/ENG-4729/refactor-reducers
In this diff I refactored the firt two ifs of this reducer. The rest of the logic will be refactored in next diffs
Test Plan: Dispatched setNewSessionActionType and resetUserStateActionType, chceked that the reducer works as expected for them
Reviewers: michal, kamil, ginsu
Reviewed By: michal
Subscribers: ashoat, tomek, wyilio
Differential Revision: https://phab.comm.dev/D9750