[parser] add test runner option to record diffs
[parser] add test runner option to record diffs

Summary:
we test the flow parser against the esprima tests. we don't edit the upstream esprima tests to make it easier to tell where we differ from esprima, and to make future merges easier. instead, we write `.diff` files that patch the expected tests before comparing them against the actual flow output. if we don't handle something, we skip it with a `.skip` file.

the test runner has a `-r` "record" option, which overwrites the expected files, which we use for our own flow tests. this diff adds a "-d" option that creates the `.diff` files (in limited cases, the rest are TODOs). it also adds a `-s SKIP_REASON` option to skip failing tests by writing `.skip` files containing `SKIP_REASON`

Changelog: [internal]

Reviewed By: SamChou19815

Differential Revision: D36584916

fbshipit-source-id: 1eb3b2b969c1cdd623371be341d4190b3f2406f2

facebook/flow,mroch/flow,mroch/flow,facebook/flow,facebook/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,mroch/flow,facebook/flow,mroch/flow,facebook/flow