ErasureCode: fix plugin loading threaded test

The TEST_F(ErasureCodePluginRegistryTest, factory_mutex) was bugous and
only succeeded by chance. The sleep was on the factory constructor which
was never called. An erasure code plugin that hangs forever on load is
created instead.

The sleep_forever.detach is replaced by pthread_cancel to interrupt the
thread that hangs forever. If not, gtest will try to join the thread and
never exit.

Signed-off-by: Loic Dachary <loic@dachary.org>
Merge pull request #628 from dachary/wip-erasure-fix-thread-test

ErasureCode: fix plugin loading threaded test

Reviewed-by: Sage Weil <sage@inktank.com>