Port `eig` CPU from TH to ATen (#43215)
Summary:
Also consolidates shared logic between `eig` CPU and CUDA implementations
Fixes https://github.com/pytorch/pytorch/issues/24693
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43215
Reviewed By: VitalyFedyunin, zhangguanheng66
Differential Revision: D23862622
Pulled By: ngimel
fbshipit-source-id: ca1002428850520cd74cd5b7ed8cb4d12dbd9c52