Handling of enums

Hello orangeduck

I needed some better handling of enums for my needs in darktable so I've added the needed code, example and documentation

As stated in the FAQ it's a bit tricky but I manage by handling enums as "blind memory chunks" that I memcopy in and out, which avoids needing the real type and works around the compiler defined size of enums.

On the lua side it's simply strings so no worry there.

This change is more intrusive than my previous ones, so please give it a good look before merging, but it should be good as far as I have tested