Fix `codegen/cuda` gcc-5.4 compilation issues (#43223)
Summary:
Most of the fixes is the same old enum-is-not-hasheable error
In manager.cpp use std::unordered_map::emplace rather than `insert` to avoid error triggered by missed copy elision
This regression was introduced by https://github.com/pytorch/pytorch/pull/43129
Pull Request resolved: https://github.com/pytorch/pytorch/pull/43223
Reviewed By: albanD, seemethere
Differential Revision: D23198330
Pulled By: malfet
fbshipit-source-id: 576082f7a4454dd29182892c9c4e0b51a967d456