Revert D25434956: [JIT] Use `is_buffer` in `BufferPolicy::valid`
Test Plan: revert-hammer
Differential Revision:
D25434956 (https://github.com/pytorch/pytorch/commit/a480ca53028658ec32ee18183a40cda60304663a)
Original commit changeset: ff2229058abb
fbshipit-source-id: faba801e9b5e9fa0117624350518592868856eec