Use an MVar for debug logging to avoid multi-threaded interleaving.
Use an MVar for debug logging to avoid multi-threaded interleaving.

Turns out that, because Handle goes out of its way to allow concurrent access,
if two threads are trying to log at the same time, their output is interleaved
at the character level, rendering it useless.

Using an MVar instead is a little crude, not to mention cruel to concurrency,
but at least it makes the output readable.

janrain/riak-haskell-client,k-bx/riak-haskell-client,bumptech/riak-haskell-client