cabal: Compile everything with -threaded.

It seems that timeout or sockets can deadlock otherwise.