Add functions to CoreConstant so enums can be properly deduced. Also add the enums in release builds to make consistent with ClassDB enums and avoid differences in script compilation between debug and release.