Copy rollbear/strong_type to `c10/util`
Pull Request resolved: https://github.com/pytorch/pytorch/pull/78162
There are a lot of cases in the profiler (and I suspect elsewhere in the codebase) where we just sling around ints and hope for the best. I've hit a bunch of bugs while refactoring the profiler that amount to "I fat fingered it, but it still compiles because an int is an int".
Options considered:
1) BOOST_STRONG_TYPEDEF
This was my initial plan, but requires tweaking to remove boost deps and prevent runtime overhead. (https://godbolt.org/z/oKs18Y7a8)
2) https://github.com/foonathan/type_safe
Seems cool and well regarded, but is also large and would be a pain to pull in.
3) https://github.com/rollbear/strong_type
Single header and very easy to configure.
(3) Seems to be the best fit, and I've found it really pleasant to work with when refactoring the python profiler.
Differential Revision: [D36364595](https://our.internmc.facebook.com/intern/diff/D36364595/)
Approved by: https://github.com/aaronenyeshi