Extended buffer support for file_io
Extended buffer support for file_io

Summary:
This adds the `buffering` param from Python built-in `open()` to `file_io`: https://docs.python.org/3/library/functions.html#open

This allows the consumer of the API to specify how much should be buffered in-memory before being flushed to the raw resource.

Reviewed By: theweiho, sujitoc

Differential Revision: D18058123

fbshipit-source-id: 8473887417092b5aa1f1f38d4c7a6d6cc3a608af

facebookresearch/detectron2,facebookresearch/detectron2,facebookresearch/detectron2