use TH instead of a configure script to determine C types

Instead of a configure script calling into ghci to get the size of a CLong and CULong, we can do that directly using template Haskell. Also export this type synonym so it can be used by other packages, ensuring consistency.