Auto merge of #1232 - emilio:enum-colon-bool, r=pepyakin

codegen: Try to reasonably handle enum : bool.

Just use the repr name we generate, since we generate constants for that.

It's not worth trying to guess the actual type to use IMO.

Bindings lose a bit of portability I guess, but that's really a lost bet
already, so instead of special-casing bool and map constants, let's use a
consistent representation everywhere.

Fixes #1145