[hack] Write `.hhi` files to disk during testing
[hack] Write `.hhi` files to disk during testing

Summary:
During testing, the contents of the `.hhi` files are inserted into the shared memory heaps, and expected to be there when accessed. They don't actually have valid file paths associated with them, so they can't be read from disk.

If we want to remove shared memory heaps and move to an LRU cache, we want to stop preserving the invariant that everything ever inserted into a heap is there unless explicitly deleted. When we ask for an item that is not present in the heap, we'll compute it on-demand, and then potentially insert it into the heap (and if it's an LRU cache, this may evict something else).

Currently, this fails in testing because the paths `.hhi` files are dummy paths, so we fail to read the `.hhi` files on disk on-demand when the heaps have zero capacity. This commit changes it so that we actually write the `.hhi` files to disk during testing, so that we can populate the heaps on-demand.

Note that `.hhi` paths refer to temporary directories. Since we emit the full paths to files in error messages for testing, we can't rely on this behavior, so we strip out the prefix for `Hhi` relative paths before printing them, to get consistent output for testing. (This was not a problem in the previous version because we just made up the file path and never actually had to read from it.)

One alternative approach would be to never store `.hhi` files on disk, and always defer to the in-memory implementation when asking for an `.hhi` file, for both test and real operation. Currently, during real operation, the `.hhi` files actually are written to disk. This means that you get real file paths when referring to `.hhi` files, you can go-to-definition into one in your editor, etc. For these reasons, it's not desirable to keep them in memory, as the user can no longer inspect them directly.

Reviewed By: pittsw

Differential Revision: D14936036

fbshipit-source-id: fb5d05919b1f9f7b7222a4b65a7eb6dbe52e30d5

mroch/flow,facebook/flow,mroch/flow,mroch/flow,gabelevi/flow,samwgoldman/flow,samwgoldman/flow,gabelevi/flow,gabelevi/flow,samwgoldman/flow,mroch/flow,facebook/flow,facebook/flow,mroch/flow,samwgoldman/flow,facebook/flow,samwgoldman/flow,samwgoldman/flow,mroch/flow,facebook/flow,mroch/flow,gabelevi/flow,samwgoldman/flow,facebook/flow,gabelevi/flow,facebook/flow,gabelevi/flow,gabelevi/flow