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: mrshenli
Differential Revision: D25740586
Pulled By: soulitzer
fbshipit-source-id: 3d7bdbab91eb208ac9e6832bb766d9d95a00c103