Add torch.memory_format support to the TorchScript
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/28544
Test Plan: Imported from OSS
Differential Revision: D18093801
Pulled By: VitalyFedyunin
fbshipit-source-id: 2c82a1508da50a24825b44939434d86546cf1e19