[hack] Allow `Daemon.spawn` to pass through functions
[hack] Allow `Daemon.spawn` to pass through functions

Summary:
The parent can pass params through to the child process. Until
this diff, we used `Pervasives.output_value`. The docs say

>  output_value is equivalent to Marshal.to_channel with an empty list
>  of flags

This change lets us pass functions to the child process

Reviewed By: alexchow, avikchaudhuri

Differential Revision: D8100894

fbshipit-source-id: d236283eb1622224df8b53b61ffb4b376c5031f7

nmote/flow,facebook/flow,facebook/flow,gabelevi/flow,jamesgpearce/flow,claudiopro/flow,samwgoldman/flow,samwgoldman/flow,nmote/flow,samwgoldman/flow,mroch/flow,claudiopro/flow,claudiopro/flow,facebook/flow,jamesgpearce/flow,mroch/flow,gabelevi/flow,mroch/flow,jamesgpearce/flow,jamesgpearce/flow,gabelevi/flow,popham/flow,popham/flow,mroch/flow,nmote/flow,mroch/flow,popham/flow,AgentME/flow,JonathanUsername/flow,nmote/flow,gabelevi/flow,JonathanUsername/flow,samwgoldman/flow,samwgoldman/flow,popham/flow,JonathanUsername/flow,AgentME/flow,facebook/flow,JonathanUsername/flow,facebook/flow,nmote/flow,jamesgpearce/flow,jamesgpearce/flow,facebook/flow,gabelevi/flow,AgentME/flow,mroch/flow,claudiopro/flow,samwgoldman/flow,facebook/flow,JonathanUsername/flow,gabelevi/flow,AgentME/flow,jamesgpearce/flow,JonathanUsername/flow,mroch/flow,gabelevi/flow,popham/flow,popham/flow,samwgoldman/flow,AgentME/flow,popham/flow,JonathanUsername/flow,nmote/flow,claudiopro/flow,nmote/flow