Move all the generated code for enums into CGEnum.
Remove EnumEntry, as Rust already provides O(1) access to the string length.
Use ToJSValConvertible to convert enums to JSVal.
Use ToJSValConvertible to convert nullable enums to JSVal.
auto merge of #2049 : Ms2ger/servo/enum-jsval, r=jdm