[ADD] builtin function enum_to_int()

[ADD] added tests for the new enum_to_int function