Revert D26973911: Implement public API InferenceMode and its error handling
Test Plan: revert-hammer
Differential Revision:
D26973911 (https://github.com/pytorch/pytorch/commit/7caa464631c1fcc9f9a4290cf0fe7913c36d1796)
Original commit changeset: 0ebdac7a3cd5
fbshipit-source-id: afd37a3785bc694e8ffbd679eba1cfed89ef2273