Add type annotations to `clientConnect.ml`
Summary:
Add type annotations to `clientConnect.ml`.
This exposes an issue where we sometimes send different types over RPC:
* For persistent clients, we always send a `persistent_client_message_type`.
* For non-persistent clients, we send a `persistent_client_message_type` when sending `Ping` or `Hello` messages, or directly send a payload otherwise.
This is dubious because the payload and the `Ping`/`Hello` variants belong to different types, so it's accident that it works to begin with.
The fix is to just use the existing `Response` type to convey the payload, and assert that we don't ever send a `Push` notification to a non-persistent client. (I bet there's a fancy type system way to do it also, but let's not bother.)
Reviewed By: ljw1004
Differential Revision:
D13149117
fbshipit-source-id:
61848882f9a8a97c5c9daf1469dff59b1910c68b