[identity] Extract function to ed25519 verify message
Summary: This code is used in two places, and is going to be used in third one, so extracted this to a separate func.
Test Plan:
- Checked that nonces are still verified correctly (also Commtest proves it)
- Set the KEYSERVER_PUBLIC_KEY env variable and checked that reserved usernames RPCs pass verification
Reviewers: will, kamil
Reviewed By: will
Subscribers: ashoat, tomek
Differential Revision: https://phab.comm.dev/D11957