[NNC] Add a dtypeToCppString virtual method in IRPrinter (#59449)
Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/59449
Make dtypeToCppString as a virtual method so that a child
class can easily override the dtype string generation rule. This is
needed as a preparation to make loop and tensor index as int64_t.
Test Plan:
```
build/bin/test_tensorexpr
```
Reviewed By: H-Huang
Differential Revision: D29173969
Pulled By: desertfire
fbshipit-source-id: a447badba76788354da1c79f80c834c99f105776