[hack] Option to restart Informant
[hack] Option to restart Informant

Summary:
`Informant` is part of server monitor which listens to Watchman and tries to figure out what is the merge base of current revision (and whether it's worth restarting the server due to changes to it).

I'm adding similar capability to server itself, and run into a problem where we can end up restarting twice in a row - once triggered by server, and once by Informant. To prevent it, we need to restart the Informant when server exits due to mergebase change.

If the server can restart itself, why keep the Informant logic at all, I hear you ask?

The original scenario that Informant was solving was:

* server starts and for some reason goes to typecheck files for many minutes
* user rebases over many revisions
* after the typechecking is finished, server notices that it was useless because `.hhconfig` has changed, or there are so many changes that it's better to restart with new saved state

Since Informant is (by design) never doing any blocking operations, it could spot those situations much sooner and restart the server, saving us from doing the useless typecheck.

With non-blocking typechecking this scenario has become less important, but since server (as opposed to Informant) is often doing other blocking things that were not made interruptible, there are still cases where Informant can make a decision sooner than server. See test plan of D10100451 for example.

Reviewed By: 2BitSalute

Differential Revision: D10100445

fbshipit-source-id: b071bb0b37d309665e78fd3794cf8612d82ee2d5

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