Added autograd support for C->C functions and enabled requires_grad=True for complex (#36932)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/36932
Differential Revision: D21181230
Pulled By: anjali411
fbshipit-source-id: 295f2cd1e2b9918a8b2cb88cab0536b2407dc455