Functorize idecommand protocol
Functorize idecommand protocol

Summary:
I was going to use first-class modules to do this, but I realized I would need
to pass the module around enough that this seemed simpler in the end.

Reviewed By: avikchaudhuri

Differential Revision: D4918720

fbshipit-source-id: 29afb0f71ff08e5e980f1940953cab016f7545b3

facebook/flow,samwgoldman/flow,MichaelDeBoey/flow,facebook/flow,popham/flow,nmote/flow,jamesgpearce/flow,JonathanUsername/flow,facebook/flow,jamesgpearce/flow,nmote/flow,ylu1317/flow,facebook/flow,fletcherw/flow,MichaelDeBoey/flow,TiddoLangerak/flow,facebook/flow,JonathanUsername/flow,nmote/flow,popham/flow,JonathanUsername/flow,gabelevi/flow,fletcherw/flow,mroch/flow,mroch/flow,mroch/flow,gabelevi/flow,nmote/flow,AgentME/flow,mroch/flow,fletcherw/flow,samwgoldman/flow,samwgoldman/flow,mroch/flow,TiddoLangerak/flow,popham/flow,claudiopro/flow,ylu1317/flow,TiddoLangerak/flow,popham/flow,facebook/flow,MichaelDeBoey/flow,mroch/flow,AgentME/flow,claudiopro/flow,nmote/flow,claudiopro/flow,jamesgpearce/flow,fletcherw/flow,popham/flow,gabelevi/flow,ylu1317/flow,jamesgpearce/flow,nmote/flow,nmote/flow,MichaelDeBoey/flow,samwgoldman/flow,ylu1317/flow,samwgoldman/flow,JonathanUsername/flow,mroch/flow,AgentME/flow,jamesgpearce/flow,gabelevi/flow,claudiopro/flow,fletcherw/flow,claudiopro/flow,popham/flow,fletcherw/flow,JonathanUsername/flow,JonathanUsername/flow,samwgoldman/flow,samwgoldman/flow,gabelevi/flow,ylu1317/flow,gabelevi/flow,JonathanUsername/flow,gabelevi/flow,TiddoLangerak/flow,MichaelDeBoey/flow,popham/flow,jamesgpearce/flow,AgentME/flow,jamesgpearce/flow,AgentME/flow,TiddoLangerak/flow,facebook/flow