Improve `torch.flatten` docs and add tests to test_view_ops (#49501)
Summary:
Addresses https://github.com/pytorch/pytorch/issues/39474
Pull Request resolved: https://github.com/pytorch/pytorch/pull/49501
Reviewed By: mruberry
Differential Revision: D25734450
Pulled By: soulitzer
fbshipit-source-id: 993667dd07acd81a4616465e0a3b94bde449193e