Add rate limiting to connection code
Add rate limiting to connection code

Summary:
I have had reports of `flow status` and other commands spin-waiting for the server to initialize or recheck. This should not happen and I have not been able to repro. The `connect_once` function should block trying to connect to the server for a second. However, there's no harm in being defensive here.
Closes https://github.com/facebook/flow/pull/2115

Reviewed By: samwgoldman

Differential Revision: D3602038

Pulled By: gabelevi

fbshipit-source-id: 5142e59c11fce3ad9d84eb8a563521f42b79520d

facebook/flow,fletcherw/flow,AgentME/flow,gabelevi/flow,claudiopro/flow,nmote/flow,mroch/flow,AprilArcus/flow,jamesgpearce/flow,AgentME/flow,samwgoldman/flow,chenglou/flow,JonathanUsername/flow,nmote/flow,TiddoLangerak/flow,ForbesLindesay/flow,jdelStrother/flow,jgrund/flow,jeffmo/flow,gabelevi/flow,nmote/flow,gabelevi/flow,gabelevi/flow,JonathanUsername/flow,jdelStrother/flow,facebook/flow,JonathanUsername/flow,samwgoldman/flow,AprilArcus/flow,popham/flow,mroch/flow,AgentME/flow,ForbesLindesay/flow,claudiopro/flow,jgrund/flow,MichaelDeBoey/flow,jamesgpearce/flow,mroch/flow,ForbesLindesay/flow,nmote/flow,ForbesLindesay/flow,ForbesLindesay/flow,jamesgpearce/flow,fletcherw/flow,jdelStrother/flow,jamesgpearce/flow,nmote/flow,chenglou/flow,fletcherw/flow,samwgoldman/flow,facebook/flow,AprilArcus/flow,jeffmo/flow,MichaelDeBoey/flow,gabelevi/flow,popham/flow,mroch/flow,popham/flow,jeffmo/flow,claudiopro/flow,fletcherw/flow,AprilArcus/flow,gabro/flow,gabro/flow,fletcherw/flow,mroch/flow,chenglou/flow,popham/flow,facebook/flow,JonathanUsername/flow,jeffmo/flow,TiddoLangerak/flow,ylu1317/flow,gabro/flow,jgrund/flow,popham/flow,AgentME/flow,fletcherw/flow,JonathanUsername/flow,gabro/flow,facebook/flow,AprilArcus/flow,facebook/flow,TiddoLangerak/flow,ylu1317/flow,claudiopro/flow,nmote/flow,MichaelDeBoey/flow,jdelStrother/flow,samwgoldman/flow,jdelStrother/flow,ylu1317/flow,jdelStrother/flow,JonathanUsername/flow,gabro/flow,jgrund/flow,samwgoldman/flow,claudiopro/flow,popham/flow,jeffmo/flow,jgrund/flow,jamesgpearce/flow,ylu1317/flow,ForbesLindesay/flow,samwgoldman/flow,chenglou/flow,ylu1317/flow,chenglou/flow,mroch/flow,nmote/flow,gabro/flow,MichaelDeBoey/flow,jeffmo/flow,chenglou/flow,gabelevi/flow,TiddoLangerak/flow,TiddoLangerak/flow,gabelevi/flow,mroch/flow,popham/flow,jamesgpearce/flow,MichaelDeBoey/flow,facebook/flow,jamesgpearce/flow,AgentME/flow,AprilArcus/flow,samwgoldman/flow,jgrund/flow,JonathanUsername/flow