[chore] refactor LSP server connection messages
[chore] refactor LSP server connection messages

Summary: moved metadata creation into a helper function, used `UriMap.iter` instead of `UriMap.bindings |> List.map |> List.iter`

Reviewed By: nmote

Differential Revision: D26697150

fbshipit-source-id: 3869dfb1caa4921d697d706dccffae2faf140b7e

nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow,nmote/flow