Add main encoding detection functions

I had wrapped some functions to convert from one encoding to another, and then I realized you had just done the same a few days ago. ;-) So I went on and wrote wrappers for encoding detection functions, which seem to work relatively well in the few tests I did.

Something I'm not sure I did right is what to do when `ucsdet_detect` returns `NULL`. I could return `C_NULL` or `nothing`, which would break type stability. So for now I return an object with a null pointer, and I handle this in `ucsdet_getName`, by returning an empty encoding name.