[lib/native] introduce useIsKeyserverURLValid hook
Summary:
To validate that the keyserver url the user inputted into the add keyserver input exists we should call the getVersion endpoint. The logic for this actually already exists in the KeyserverSelection component in the new registation flow. This diff factors out the shared logic into a seperate hook called useIsKeyserverURLValid.
Linear task: https://linear.app/comm/issue/ENG-5337/factor-out-shared-validation-logic-in-the-onsubmit-callback-in
Depends on D9665
Test Plan: Followed the test plan in D8198 and made sure that there were no regressions
Reviewers: inka, rohan, michal, ashoat
Reviewed By: ashoat
Subscribers: ashoat, tomek, wyilio
Differential Revision: https://phab.comm.dev/D9666