Move all named constants to cdef?

I'm not quite sure if this is a good idea, any comments?

This is basically the logical continuation of #39, based on a discussion in #31.