erasure-code: lock plugin registry in the destructor

The ErasureCodePluginRegistry destructor accesses the list of plugins
which must be locked when doing so, symetric to
ErasureCodePluginRegistry::factory (which is the only public entry point).

Signed-off-by: Loic Dachary <loic@dachary.org>