Draft: Fix threaded device allocation
We are starting to introduce threads in the VTK-m control environment so
that we can schedule multiple things at once. Once issue we ran into is
that some methods to allocate data on devices are not thread safe. To
fix this, we make allocating memory for a Buffer
thread safe. This
could potentially slow things down waiting for mutexes, but you are
hopefully not spending a lot of time allocating/deallocating memory
anyway.
Edited by Kenneth Moreland