Revert "Use ctypes to serialize raw content for tensors. (#108287)"
This reverts commit 43f28beffc572474e8c5f6ba6c33115e9dc69be9.
Reverted https://github.com/pytorch/pytorch/pull/108287 on behalf of https://github.com/desertfire due to Internal test failure from https://github.com/pytorch/pytorch/pull/107718. Revert this one first and then revert 107718. ([comment](https://github.com/pytorch/pytorch/pull/108287#issuecomment-1701138632))