Move registering of item types from global.lua to C++
Move registering of more enums from global.lua to C++
Optimizations