Allow DynamicEnum fields to be set with int/uint

I want to add the ability to use ints as enum types in pycapnp, and this change would make it much easier.