haskell: Wrote charset_set API function

Wrote plugin debug signal handlers.
Fixed register returning 0 on success instead of 1.